Added some new block types, fixed some save dialog issues
This commit is contained in:
@@ -7,6 +7,7 @@ import com.badlogic.gdx.utils.I18NBundle;
|
||||
|
||||
import io.anuke.mindustry.core.*;
|
||||
import io.anuke.mindustry.entities.Player;
|
||||
import io.anuke.ucore.UCore;
|
||||
import io.anuke.ucore.scene.ui.layout.Unit;
|
||||
|
||||
public class Vars{
|
||||
@@ -30,9 +31,11 @@ public class Vars{
|
||||
//discord group URL
|
||||
public static final String discordURL = "https://discord.gg/r8BkXNd";
|
||||
//directory for user-created map data
|
||||
public static final FileHandle customMapDirectory = gwt ? null : Gdx.files.local("mindustry-maps/");
|
||||
public static final FileHandle customMapDirectory = gwt ? null : UCore.isAssets ?
|
||||
Gdx.files.local("../../desktop/mindustry-maps") : Gdx.files.local("mindustry-maps/");
|
||||
//save file directory
|
||||
public static final FileHandle saveDirectory = gwt ? null : Gdx.files.local("mindustry-saves/");
|
||||
public static final FileHandle saveDirectory = gwt ? null : UCore.isAssets ?
|
||||
Gdx.files.local("../../desktop/mindustry-saves") : Gdx.files.local("mindustry-saves/");
|
||||
//scale of the font
|
||||
public static float fontscale = Math.max(Unit.dp.scl(1f)/2f, 0.5f);
|
||||
//camera zoom displayed on startup
|
||||
|
||||
@@ -151,6 +151,15 @@ public class LoadDialog extends FloatingDialog{
|
||||
|
||||
content().add(pane);
|
||||
|
||||
addSetup();
|
||||
}
|
||||
|
||||
public void addSetup(){
|
||||
if(Vars.control.getSaves().getSaveSlots().size != 0) return;
|
||||
|
||||
slots.row();
|
||||
slots.addButton("$text.save.none", "clear", ()->{})
|
||||
.disabled(true).fillX().margin(20f).minWidth(340f).height(80f).pad(4f);
|
||||
}
|
||||
|
||||
public void modifyButton(TextButton button, SaveSlot slot){
|
||||
|
||||
@@ -20,10 +20,7 @@ public class SaveDialog extends LoadDialog{
|
||||
super("$text.savegame");
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void setup(){
|
||||
super.setup();
|
||||
|
||||
public void addSetup(){
|
||||
if(!Vars.control.getSaves().canAddSave()){
|
||||
return;
|
||||
}
|
||||
@@ -34,10 +31,9 @@ public class SaveDialog extends LoadDialog{
|
||||
Vars.control.getSaves().addSave(text);
|
||||
setup();
|
||||
});
|
||||
}).fillX().margin(10f).height(70f).pad(4f).padRight(-4);
|
||||
}).fillX().margin(10f).minWidth(300f).height(70f).pad(4f).padRight(-4);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void modifyButton(TextButton button, SaveSlot slot){
|
||||
button.clicked(() -> {
|
||||
|
||||
@@ -63,6 +63,19 @@ public class ProductionBlocks{
|
||||
health = 70;
|
||||
}
|
||||
},
|
||||
|
||||
//TODO
|
||||
/*siliconextractor = new LiquidCrafter("siliconextractor"){
|
||||
{
|
||||
input = Item.sand;
|
||||
inputAmount = 5;
|
||||
inputLiquid = Liquid.water;
|
||||
liquidAmount = 18.99f;
|
||||
output = Item.silicon;
|
||||
health = 50;
|
||||
purifyTime = 50;
|
||||
}
|
||||
},*/
|
||||
|
||||
oilrefinery = new LiquidCrafter("oilrefinery"){
|
||||
{
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
package io.anuke.mindustry.world.blocks.types.logic;
|
||||
|
||||
import io.anuke.mindustry.world.Block;
|
||||
|
||||
public class LogicBlock extends Block{
|
||||
|
||||
public LogicBlock(String name) {
|
||||
super(name);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
package io.anuke.mindustry.world.blocks.types.production;
|
||||
|
||||
import io.anuke.mindustry.world.Block;
|
||||
|
||||
public class LiquidDrill extends Block {
|
||||
|
||||
public LiquidDrill(String name) {
|
||||
super(name);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user