Added some new block types, fixed some save dialog issues
This commit is contained in:
5
.gitignore
vendored
5
.gitignore
vendored
@@ -9,8 +9,8 @@
|
|||||||
/desktop/mindustry-maps/
|
/desktop/mindustry-maps/
|
||||||
/desktop/gifexport/
|
/desktop/gifexport/
|
||||||
/core/lib/
|
/core/lib/
|
||||||
/core/assets/mindustry-saves/
|
/android/assets/mindustry-maps/
|
||||||
/core/assets/mindustry-maps/
|
/android/assets/mindustry-saves/
|
||||||
/core/assets/gifexport/
|
/core/assets/gifexport/
|
||||||
*.gif
|
*.gif
|
||||||
|
|
||||||
@@ -129,3 +129,4 @@ gradle-app.setting
|
|||||||
## OS Specific
|
## OS Specific
|
||||||
.DS_Store
|
.DS_Store
|
||||||
Thumbs.db
|
Thumbs.db
|
||||||
|
android/libs/
|
||||||
|
|||||||
@@ -16,6 +16,7 @@ text.tutorial.next=Next >
|
|||||||
text.save.new=New Save
|
text.save.new=New Save
|
||||||
text.save.overwrite=Are you sure you want to overwrite\nthis save slot?
|
text.save.overwrite=Are you sure you want to overwrite\nthis save slot?
|
||||||
text.overwrite=Overwrite
|
text.overwrite=Overwrite
|
||||||
|
text.save.none=No saves found!
|
||||||
text.saveload=[accent]Saving...
|
text.saveload=[accent]Saving...
|
||||||
text.savefail=Failed to save game!
|
text.savefail=Failed to save game!
|
||||||
text.save.delete.confirm=Are you sure you want to delete this save?
|
text.save.delete.confirm=Are you sure you want to delete this save?
|
||||||
|
|||||||
@@ -7,6 +7,7 @@ import com.badlogic.gdx.utils.I18NBundle;
|
|||||||
|
|
||||||
import io.anuke.mindustry.core.*;
|
import io.anuke.mindustry.core.*;
|
||||||
import io.anuke.mindustry.entities.Player;
|
import io.anuke.mindustry.entities.Player;
|
||||||
|
import io.anuke.ucore.UCore;
|
||||||
import io.anuke.ucore.scene.ui.layout.Unit;
|
import io.anuke.ucore.scene.ui.layout.Unit;
|
||||||
|
|
||||||
public class Vars{
|
public class Vars{
|
||||||
@@ -30,9 +31,11 @@ public class Vars{
|
|||||||
//discord group URL
|
//discord group URL
|
||||||
public static final String discordURL = "https://discord.gg/r8BkXNd";
|
public static final String discordURL = "https://discord.gg/r8BkXNd";
|
||||||
//directory for user-created map data
|
//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
|
//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
|
//scale of the font
|
||||||
public static float fontscale = Math.max(Unit.dp.scl(1f)/2f, 0.5f);
|
public static float fontscale = Math.max(Unit.dp.scl(1f)/2f, 0.5f);
|
||||||
//camera zoom displayed on startup
|
//camera zoom displayed on startup
|
||||||
|
|||||||
@@ -151,6 +151,15 @@ public class LoadDialog extends FloatingDialog{
|
|||||||
|
|
||||||
content().add(pane);
|
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){
|
public void modifyButton(TextButton button, SaveSlot slot){
|
||||||
|
|||||||
@@ -20,10 +20,7 @@ public class SaveDialog extends LoadDialog{
|
|||||||
super("$text.savegame");
|
super("$text.savegame");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
public void addSetup(){
|
||||||
protected void setup(){
|
|
||||||
super.setup();
|
|
||||||
|
|
||||||
if(!Vars.control.getSaves().canAddSave()){
|
if(!Vars.control.getSaves().canAddSave()){
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -34,10 +31,9 @@ public class SaveDialog extends LoadDialog{
|
|||||||
Vars.control.getSaves().addSave(text);
|
Vars.control.getSaves().addSave(text);
|
||||||
setup();
|
setup();
|
||||||
});
|
});
|
||||||
}).fillX().margin(10f).height(70f).pad(4f).padRight(-4);
|
}).fillX().margin(10f).minWidth(300f).height(70f).pad(4f).padRight(-4);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void modifyButton(TextButton button, SaveSlot slot){
|
public void modifyButton(TextButton button, SaveSlot slot){
|
||||||
button.clicked(() -> {
|
button.clicked(() -> {
|
||||||
|
|||||||
@@ -64,6 +64,19 @@ public class ProductionBlocks{
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
//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"){
|
oilrefinery = new LiquidCrafter("oilrefinery"){
|
||||||
{
|
{
|
||||||
inputLiquid = Liquid.oil;
|
inputLiquid = Liquid.oil;
|
||||||
|
|||||||
@@ -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