mirror of
https://github.com/Anuken/Mindustry.git
synced 2025-02-02 20:33:50 +07:00
Minor fixes and balance changes
This commit is contained in:
parent
8a24cc354d
commit
e85c7d8e50
@ -79,7 +79,7 @@ project(":core") {
|
||||
apply plugin: "java"
|
||||
|
||||
dependencies {
|
||||
compile 'com.github.anuken:ucore:f77bdb38e4'
|
||||
compile 'com.github.anuken:ucore:5633a3df2f'
|
||||
compile "com.badlogicgames.gdx:gdx:$gdxVersion"
|
||||
compile "com.badlogicgames.gdx:gdx-ai:1.8.1"
|
||||
}
|
||||
|
@ -55,6 +55,9 @@ public class UI extends SceneModule{
|
||||
|
||||
skin.font().setUseIntegerPositions(false);
|
||||
skin.font().getData().setScale(Vars.fontscale);
|
||||
skin.font().getData().down += 4f;
|
||||
skin.font().getData().lineHeight -= 2f;
|
||||
|
||||
TooltipManager.getInstance().animations = false;
|
||||
|
||||
Dialog.closePadR = -1;
|
||||
|
@ -132,6 +132,17 @@ public class SaveIO{
|
||||
}
|
||||
}
|
||||
|
||||
public static int getWave(int slot){
|
||||
|
||||
try(DataInputStream stream = new DataInputStream(fileFor(slot).read())){
|
||||
stream.readInt();
|
||||
stream.readLong();
|
||||
return stream.readInt();
|
||||
}catch (IOException e){
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
}
|
||||
|
||||
public static FileHandle fileFor(int slot){
|
||||
return Gdx.files.local("mindustry-saves/" + slot + ".mins");
|
||||
}
|
||||
|
@ -10,44 +10,44 @@ import io.anuke.mindustry.world.blocks.ProductionBlocks;
|
||||
import io.anuke.mindustry.world.blocks.WeaponBlocks;
|
||||
|
||||
public enum Recipe{
|
||||
stonewall(distribution, Blocks.stonewall, stack(Item.stone, 5)),
|
||||
ironwall(distribution, Blocks.ironwall, stack(Item.iron, 5)),
|
||||
steelwall(distribution, Blocks.steelwall, stack(Item.steel, 5)),
|
||||
titaniumwall(distribution, Blocks.titaniumwall, stack(Item.titanium, 5)),
|
||||
duriumwall(distribution, Blocks.diriumwall, stack(Item.dirium, 5)),
|
||||
compositewall(distribution, Blocks.compositewall, stack(Item.dirium, 5), stack(Item.titanium, 5), stack(Item.steel, 5), stack(Item.iron, 5)),
|
||||
stonewall(distribution, Blocks.stonewall, stack(Item.stone, 2)),
|
||||
ironwall(distribution, Blocks.ironwall, stack(Item.iron, 2)),
|
||||
steelwall(distribution, Blocks.steelwall, stack(Item.steel, 2)),
|
||||
titaniumwall(distribution, Blocks.titaniumwall, stack(Item.titanium, 2)),
|
||||
duriumwall(distribution, Blocks.diriumwall, stack(Item.dirium, 2)),
|
||||
compositewall(distribution, Blocks.compositewall, stack(Item.dirium, 2), stack(Item.titanium, 2), stack(Item.steel, 2), stack(Item.iron, 2)),
|
||||
conveyor(distribution, ProductionBlocks.conveyor, stack(Item.stone, 1)),
|
||||
fastconveyor(distribution, ProductionBlocks.steelconveyor, stack(Item.steel, 1)),
|
||||
router(distribution, ProductionBlocks.router, stack(Item.stone, 3)),
|
||||
junction(distribution, ProductionBlocks.junction, stack(Item.iron, 5)),
|
||||
router(distribution, ProductionBlocks.router, stack(Item.stone, 2)),
|
||||
junction(distribution, ProductionBlocks.junction, stack(Item.iron, 2)),
|
||||
|
||||
turret(defense, WeaponBlocks.turret, stack(Item.stone, 6)),
|
||||
dturret(defense, WeaponBlocks.doubleturret, stack(Item.stone, 12)),
|
||||
machineturret(defense, WeaponBlocks.machineturret, stack(Item.iron, 15), stack(Item.stone, 20)),
|
||||
shotgunturret(defense, WeaponBlocks.shotgunturret, stack(Item.iron, 18), stack(Item.stone, 20)),
|
||||
flameturret(defense, WeaponBlocks.flameturret, stack(Item.iron, 25), stack(Item.steel, 18)),
|
||||
sniperturret(defense, WeaponBlocks.sniperturret, stack(Item.iron, 30), stack(Item.steel, 20)),
|
||||
laserturret(defense, WeaponBlocks.laserturret, stack(Item.steel, 20), stack(Item.titanium, 20)),
|
||||
mortarturret(defense, WeaponBlocks.mortarturret, stack(Item.steel, 40), stack(Item.titanium, 30)),
|
||||
teslaturret(defense, WeaponBlocks.teslaturret, stack(Item.steel, 20), stack(Item.titanium, 30), stack(Item.dirium, 30)),
|
||||
plasmaturret(defense, WeaponBlocks.plasmaturret, stack(Item.steel, 20), stack(Item.titanium, 20), stack(Item.dirium, 30)),
|
||||
turret(defense, WeaponBlocks.turret, stack(Item.stone, 3)),
|
||||
dturret(defense, WeaponBlocks.doubleturret, stack(Item.stone, 6)),
|
||||
machineturret(defense, WeaponBlocks.machineturret, stack(Item.iron, 7), stack(Item.stone, 10)),
|
||||
shotgunturret(defense, WeaponBlocks.shotgunturret, stack(Item.iron, 9), stack(Item.stone, 10)),
|
||||
flameturret(defense, WeaponBlocks.flameturret, stack(Item.iron, 12), stack(Item.steel, 9)),
|
||||
sniperturret(defense, WeaponBlocks.sniperturret, stack(Item.iron, 15), stack(Item.steel, 10)),
|
||||
laserturret(defense, WeaponBlocks.laserturret, stack(Item.steel, 10), stack(Item.titanium, 10)),
|
||||
mortarturret(defense, WeaponBlocks.mortarturret, stack(Item.steel, 20), stack(Item.titanium, 15)),
|
||||
teslaturret(defense, WeaponBlocks.teslaturret, stack(Item.steel, 10), stack(Item.titanium, 15), stack(Item.dirium, 15)),
|
||||
plasmaturret(defense, WeaponBlocks.plasmaturret, stack(Item.steel, 10), stack(Item.titanium, 10), stack(Item.dirium, 15)),
|
||||
|
||||
healturret(defense, WeaponBlocks.repairturret, stack(Item.iron, 50)),
|
||||
megahealturret(defense, WeaponBlocks.megarepairturret, stack(Item.iron, 30), stack(Item.steel, 50)),
|
||||
healturret(defense, WeaponBlocks.repairturret, stack(Item.iron, 25)),
|
||||
megahealturret(defense, WeaponBlocks.megarepairturret, stack(Item.iron, 15), stack(Item.steel, 25)),
|
||||
|
||||
drill(production, ProductionBlocks.stonedrill, stack(Item.stone, 6)),
|
||||
irondrill(production, ProductionBlocks.irondrill, stack(Item.stone, 40)),
|
||||
coaldrill(production, ProductionBlocks.coaldrill, stack(Item.stone, 40), stack(Item.iron, 40)),
|
||||
drill(production, ProductionBlocks.stonedrill, stack(Item.stone, 16)),
|
||||
irondrill(production, ProductionBlocks.irondrill, stack(Item.stone, 25)),
|
||||
coaldrill(production, ProductionBlocks.coaldrill, stack(Item.stone, 25), stack(Item.iron, 40)),
|
||||
titaniumdrill(production, ProductionBlocks.titaniumdrill, stack(Item.iron, 40), stack(Item.steel, 40)),
|
||||
smelter(production, ProductionBlocks.smelter, stack(Item.stone, 80), stack(Item.iron, 80)),
|
||||
crucible(production, ProductionBlocks.crucible, stack(Item.titanium, 80), stack(Item.steel, 80)),
|
||||
coalpurifier(production, ProductionBlocks.coalpurifier, stack(Item.steel, 20), stack(Item.iron, 20)),
|
||||
titaniumpurifier(production, ProductionBlocks.titaniumpurifier, stack(Item.steel, 60), stack(Item.iron, 60)),
|
||||
omnidrill(production, ProductionBlocks.omnidrill, stack(Item.titanium, 40), stack(Item.dirium, 40)),
|
||||
smelter(production, ProductionBlocks.smelter, stack(Item.stone, 40), stack(Item.iron, 40)),
|
||||
crucible(production, ProductionBlocks.crucible, stack(Item.titanium, 40), stack(Item.steel, 40)),
|
||||
coalpurifier(production, ProductionBlocks.coalpurifier, stack(Item.steel, 10), stack(Item.iron, 10)),
|
||||
titaniumpurifier(production, ProductionBlocks.titaniumpurifier, stack(Item.steel, 30), stack(Item.iron, 30)),
|
||||
omnidrill(production, ProductionBlocks.omnidrill, stack(Item.titanium, 20), stack(Item.dirium, 20)),
|
||||
|
||||
conduit(distribution, ProductionBlocks.conduit, stack(Item.steel, 1)),
|
||||
liquidrouter(distribution, ProductionBlocks.liquidrouter, stack(Item.steel, 5)),
|
||||
pump(production, ProductionBlocks.pump, stack(Item.steel, 20));
|
||||
liquidrouter(distribution, ProductionBlocks.liquidrouter, stack(Item.steel, 2)),
|
||||
pump(production, ProductionBlocks.pump, stack(Item.steel, 10));
|
||||
|
||||
public Block result;
|
||||
public ItemStack[] requirements;
|
||||
|
@ -1,5 +1,6 @@
|
||||
package io.anuke.mindustry.ui;
|
||||
|
||||
import com.badlogic.gdx.utils.Align;
|
||||
import com.badlogic.gdx.utils.Timer;
|
||||
import com.badlogic.gdx.utils.Timer.Task;
|
||||
|
||||
@ -8,6 +9,7 @@ import io.anuke.mindustry.GameState.State;
|
||||
import io.anuke.mindustry.Vars;
|
||||
import io.anuke.mindustry.io.SaveIO;
|
||||
import io.anuke.ucore.scene.ui.Dialog;
|
||||
import io.anuke.ucore.scene.ui.Label;
|
||||
import io.anuke.ucore.scene.ui.TextButton;
|
||||
import io.anuke.ucore.scene.ui.layout.Unit;
|
||||
|
||||
@ -39,7 +41,12 @@ public class LoadDialog extends Dialog{
|
||||
button.getLabelCell().top().left().growX();
|
||||
button.row();
|
||||
button.pad(Unit.dp.inPixels(10));
|
||||
button.add("[gray]" + (!SaveIO.isSaveValid(i) ? "<empty>" : "Last Saved: " + SaveIO.getTimeString(i))).padBottom(2);
|
||||
|
||||
Label info = new Label("[gray]" + (!SaveIO.isSaveValid(i) ? "<empty>" : "Wave " +
|
||||
SaveIO.getWave(slot)+"\nLast Saved: " + SaveIO.getTimeString(i)));
|
||||
info.setAlignment(Align.center, Align.center);
|
||||
|
||||
button.add(info).padBottom(2).padTop(6);
|
||||
button.getLabel().setFontScale(Unit.dp.inPixels(0.75f));
|
||||
button.setDisabled(!SaveIO.isSaveValid(i));
|
||||
|
||||
@ -65,7 +72,7 @@ public class LoadDialog extends Dialog{
|
||||
}
|
||||
});
|
||||
|
||||
content().add(button).size(400, 78).units(Unit.dp).pad(2);
|
||||
content().add(button).size(400, 80).units(Unit.dp).pad(2);
|
||||
content().row();
|
||||
}
|
||||
|
||||
|
@ -1,14 +1,13 @@
|
||||
package io.anuke.mindustry.ui;
|
||||
|
||||
import com.badlogic.gdx.utils.Align;
|
||||
import com.badlogic.gdx.utils.Timer;
|
||||
import com.badlogic.gdx.utils.Timer.Task;
|
||||
import com.badlogic.gdx.utils.reflect.ClassReflection;
|
||||
|
||||
import io.anuke.mindustry.Vars;
|
||||
import io.anuke.mindustry.io.SaveIO;
|
||||
import io.anuke.ucore.scene.ui.ConfirmDialog;
|
||||
import io.anuke.ucore.scene.ui.Dialog;
|
||||
import io.anuke.ucore.scene.ui.TextButton;
|
||||
import io.anuke.ucore.scene.ui.*;
|
||||
import io.anuke.ucore.scene.ui.layout.Cell;
|
||||
import io.anuke.ucore.scene.ui.layout.Unit;
|
||||
|
||||
@ -40,7 +39,12 @@ public class SaveDialog extends Dialog{
|
||||
button.getLabelCell().top().left().growX();
|
||||
button.row();
|
||||
button.pad(Unit.dp.inPixels(10));
|
||||
button.add((!SaveIO.isSaveValid(i) ? "[gray]<empty>" : "[LIGHT_GRAY]Last Saved: " + SaveIO.getTimeString(i))).padBottom(2);
|
||||
|
||||
Label info = new Label("[gray]" + (!SaveIO.isSaveValid(i) ? "<empty>" : "Wave " +
|
||||
SaveIO.getWave(slot)+"\nLast Saved: " + SaveIO.getTimeString(i)));
|
||||
info.setAlignment(Align.center, Align.center);
|
||||
|
||||
button.add(info).padBottom(2).padTop(6);
|
||||
button.getLabel().setFontScale(Unit.dp.inPixels(0.75f));
|
||||
|
||||
button.clicked(()->{
|
||||
@ -57,7 +61,7 @@ public class SaveDialog extends Dialog{
|
||||
}
|
||||
});
|
||||
|
||||
content().add(button).size(400, 78).units(Unit.dp).pad(2);
|
||||
content().add(button).size(400, 80).units(Unit.dp).pad(2);
|
||||
content().row();
|
||||
}
|
||||
}
|
||||
|
@ -11,7 +11,7 @@ import io.anuke.ucore.util.Mathf;
|
||||
public class Drill extends Block{
|
||||
protected Block resource;
|
||||
protected Item result;
|
||||
protected int time = 6;
|
||||
protected int time = 5;
|
||||
|
||||
public Drill(String name) {
|
||||
super(name);
|
||||
|
@ -40,7 +40,9 @@ public class RepairTurret extends Turret{
|
||||
|
||||
@Override
|
||||
public void drawPixelOverlay(Tile tile){
|
||||
|
||||
Draw.color("green");
|
||||
Draw.dashcircle(tile.worldx(), tile.worldy(), range);
|
||||
Draw.reset();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
Binary file not shown.
@ -16,7 +16,7 @@ public class DesktopLauncher {
|
||||
Lwjgl3ApplicationConfiguration config = new Lwjgl3ApplicationConfiguration();
|
||||
config.setTitle("Mindustry");
|
||||
config.setMaximized(true);
|
||||
config.useVsync(false);
|
||||
//config.useVsync(false);
|
||||
config.setWindowedMode(800, 600);
|
||||
config.setWindowIcon("sprites/icon.png");
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user