Minor balance changes (made coal less rare, nerfed blast enemies)
This commit is contained in:
@@ -1,8 +1,8 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
package="io.anuke.mindustry"
|
package="io.anuke.mindustry"
|
||||||
android:versionCode="12"
|
android:versionCode="14"
|
||||||
android:versionName="2.2" >
|
android:versionName="2.3.1" >
|
||||||
|
|
||||||
<uses-sdk android:minSdkVersion="9" android:targetSdkVersion="25" />
|
<uses-sdk android:minSdkVersion="9" android:targetSdkVersion="25" />
|
||||||
|
|
||||||
|
|||||||
@@ -50,7 +50,7 @@ project(":html") {
|
|||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
compile project(":core")
|
compile project(":core")
|
||||||
compile fileTree(dir: '../core/lib', include: '*.jar')
|
//compile fileTree(dir: '../core/lib', include: '*.jar')
|
||||||
compile "com.badlogicgames.gdx:gdx-backend-gwt:$gdxVersion"
|
compile "com.badlogicgames.gdx:gdx-backend-gwt:$gdxVersion"
|
||||||
compile "com.badlogicgames.gdx:gdx:$gdxVersion:sources"
|
compile "com.badlogicgames.gdx:gdx:$gdxVersion:sources"
|
||||||
compile "com.badlogicgames.gdx:gdx-backend-gwt:$gdxVersion:sources"
|
compile "com.badlogicgames.gdx:gdx-backend-gwt:$gdxVersion:sources"
|
||||||
@@ -79,7 +79,7 @@ project(":core") {
|
|||||||
apply plugin: "java"
|
apply plugin: "java"
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
compile 'com.github.anuken:ucore:09cc372d6b'
|
compile 'com.github.anuken:ucore:989f9713fa'
|
||||||
compile "com.badlogicgames.gdx:gdx:$gdxVersion"
|
compile "com.badlogicgames.gdx:gdx:$gdxVersion"
|
||||||
compile "com.badlogicgames.gdx:gdx-ai:1.8.1"
|
compile "com.badlogicgames.gdx:gdx-ai:1.8.1"
|
||||||
}
|
}
|
||||||
|
|||||||
Binary file not shown.
|
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 1.2 KiB |
@@ -37,7 +37,6 @@ import io.anuke.ucore.util.Mathf;
|
|||||||
public class Control extends Module{
|
public class Control extends Module{
|
||||||
int targetscale = baseCameraScale;
|
int targetscale = baseCameraScale;
|
||||||
|
|
||||||
boolean showedTutorial;
|
|
||||||
Tutorial tutorial = new Tutorial();
|
Tutorial tutorial = new Tutorial();
|
||||||
boolean hiscore = false;
|
boolean hiscore = false;
|
||||||
|
|
||||||
@@ -53,6 +52,7 @@ public class Control extends Module{
|
|||||||
float respawntime;
|
float respawntime;
|
||||||
|
|
||||||
public Control(){
|
public Control(){
|
||||||
|
|
||||||
if(Mindustry.args.contains("-debug", false)){
|
if(Mindustry.args.contains("-debug", false)){
|
||||||
Vars.debug = true;
|
Vars.debug = true;
|
||||||
}
|
}
|
||||||
@@ -173,13 +173,7 @@ public class Control extends Module{
|
|||||||
//multiplying by 2 so you start with more time in the beginning
|
//multiplying by 2 so you start with more time in the beginning
|
||||||
wavetime = waveSpacing()*2;
|
wavetime = waveSpacing()*2;
|
||||||
|
|
||||||
if(showedTutorial || !Settings.getBool("tutorial")){
|
|
||||||
GameState.set(State.playing);
|
GameState.set(State.playing);
|
||||||
}else{
|
|
||||||
GameState.set(State.paused);
|
|
||||||
ui.showTutorial();
|
|
||||||
showedTutorial = true;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void playMap(Map map){
|
public void playMap(Map map){
|
||||||
|
|||||||
@@ -6,6 +6,9 @@ import com.badlogic.gdx.utils.Array;
|
|||||||
|
|
||||||
import io.anuke.mindustry.GameState.State;
|
import io.anuke.mindustry.GameState.State;
|
||||||
import io.anuke.mindustry.io.Formatter;
|
import io.anuke.mindustry.io.Formatter;
|
||||||
|
import io.anuke.mindustry.world.blocks.Blocks;
|
||||||
|
import io.anuke.mindustry.world.blocks.ProductionBlocks;
|
||||||
|
import io.anuke.mindustry.world.blocks.WeaponBlocks;
|
||||||
import io.anuke.ucore.core.Inputs;
|
import io.anuke.ucore.core.Inputs;
|
||||||
import io.anuke.ucore.core.Timers;
|
import io.anuke.ucore.core.Timers;
|
||||||
import io.anuke.ucore.modules.ModuleCore;
|
import io.anuke.ucore.modules.ModuleCore;
|
||||||
@@ -28,6 +31,12 @@ public class Mindustry extends ModuleCore {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void init(){
|
public void init(){
|
||||||
|
//always initialize blocks in this order, otherwise there are ID errors
|
||||||
|
Blocks.dirt.getClass();
|
||||||
|
ProductionBlocks.coaldrill.getClass();
|
||||||
|
WeaponBlocks.turret.getClass();
|
||||||
|
|
||||||
|
|
||||||
module(Vars.control = new Control());
|
module(Vars.control = new Control());
|
||||||
module(Vars.renderer = new Renderer());
|
module(Vars.renderer = new Renderer());
|
||||||
module(Vars.ui = new UI());
|
module(Vars.ui = new UI());
|
||||||
@@ -44,7 +53,7 @@ public class Mindustry extends ModuleCore {
|
|||||||
try{
|
try{
|
||||||
super.render();
|
super.render();
|
||||||
}catch (RuntimeException e){
|
}catch (RuntimeException e){
|
||||||
//TODO
|
//TODO display error log
|
||||||
//Gdx.app.getClipboard().setContents(e.getMessage());
|
//Gdx.app.getClipboard().setContents(e.getMessage());
|
||||||
throw e;
|
throw e;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -41,7 +41,6 @@ public class Renderer extends RendererModule{
|
|||||||
pixelate();
|
pixelate();
|
||||||
|
|
||||||
Graphics.addSurface("shadow", Core.cameraScale);
|
Graphics.addSurface("shadow", Core.cameraScale);
|
||||||
Shaders.create();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -6,10 +6,7 @@ import io.anuke.ucore.graphics.Shader;
|
|||||||
import io.anuke.ucore.util.Tmp;
|
import io.anuke.ucore.util.Tmp;
|
||||||
|
|
||||||
public class Shaders{
|
public class Shaders{
|
||||||
|
public static final Outline outline = new Outline();
|
||||||
public static void create(){
|
|
||||||
new Outline();
|
|
||||||
}
|
|
||||||
|
|
||||||
public static class Outline extends Shader{
|
public static class Outline extends Shader{
|
||||||
public Color color = new Color();
|
public Color color = new Color();
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ public class UI extends SceneModule{
|
|||||||
Table itemtable, weapontable, tools, loadingtable, desctable, respawntable;
|
Table itemtable, weapontable, tools, loadingtable, desctable, respawntable;
|
||||||
SettingsDialog prefs;
|
SettingsDialog prefs;
|
||||||
KeybindDialog keys;
|
KeybindDialog keys;
|
||||||
Dialog about, menu, restart, tutorial, levels, upgrades, load, settingserror;
|
Dialog about, menu, restart, levels, upgrades, load, settingserror;
|
||||||
Tooltip tooltip;
|
Tooltip tooltip;
|
||||||
|
|
||||||
VisibilityProvider play = () -> !GameState.is(State.menu);
|
VisibilityProvider play = () -> !GameState.is(State.menu);
|
||||||
@@ -163,8 +163,6 @@ public class UI extends SceneModule{
|
|||||||
for(Cell<?> cell : about.content().getCells())
|
for(Cell<?> cell : about.content().getCells())
|
||||||
cell.left();
|
cell.left();
|
||||||
|
|
||||||
tutorial = new TutorialDialog();
|
|
||||||
|
|
||||||
restart = new Dialog("The core was destroyed.", "dialog");
|
restart = new Dialog("The core was destroyed.", "dialog");
|
||||||
|
|
||||||
restart.shown(()->{
|
restart.shown(()->{
|
||||||
@@ -383,7 +381,7 @@ public class UI extends SceneModule{
|
|||||||
new table(){{
|
new table(){{
|
||||||
|
|
||||||
new table("pane"){{
|
new table("pane"){{
|
||||||
defaults().size(220, 50).pad(3);
|
defaults().size(220, 48).pad(3);
|
||||||
|
|
||||||
new button("Play", () -> {
|
new button("Play", () -> {
|
||||||
levels.show();
|
levels.show();
|
||||||
@@ -432,7 +430,7 @@ public class UI extends SceneModule{
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
get().pad(Unit.dp.inPixels(20));
|
get().pad(Unit.dp.inPixels(16));
|
||||||
}};
|
}};
|
||||||
|
|
||||||
get().setVisible(nplay);
|
get().setVisible(nplay);
|
||||||
@@ -701,10 +699,6 @@ public class UI extends SceneModule{
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void showTutorial(){
|
|
||||||
tutorial.show();
|
|
||||||
}
|
|
||||||
|
|
||||||
public void showRestart(){
|
public void showRestart(){
|
||||||
restart.show();
|
restart.show();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ public class Vars{
|
|||||||
//respawn time in frames
|
//respawn time in frames
|
||||||
public static final float respawnduration = 60*4;
|
public static final float respawnduration = 60*4;
|
||||||
//time between waves in frames
|
//time between waves in frames
|
||||||
public static final float wavespace = 30*60*(android ? 1 : 1);
|
public static final float wavespace = 35*60*(android ? 1 : 1);
|
||||||
//waves can last no longer than 6 minutes, otherwise the next one spawns
|
//waves can last no longer than 6 minutes, otherwise the next one spawns
|
||||||
public static final float maxwavespace = 60*60*6;
|
public static final float maxwavespace = 60*60*6;
|
||||||
//how far away from spawn points the player can't place blocks
|
//how far away from spawn points the player can't place blocks
|
||||||
@@ -50,38 +50,4 @@ public class Vars{
|
|||||||
"- [RED]freemusicarchive.org[] for music",
|
"- [RED]freemusicarchive.org[] for music",
|
||||||
"- Music made by [GREEN]RoccoW[]",
|
"- Music made by [GREEN]RoccoW[]",
|
||||||
};
|
};
|
||||||
|
|
||||||
public static String[] tutorialText = {
|
|
||||||
"[GREEN]Default Controls:",
|
|
||||||
"[WHITE][YELLOW][[WASD][] to move, [YELLOW][[R][] to rotate blocks.",
|
|
||||||
"Hold [YELLOW][[R-MOUSE][] to destroy blocks, click [YELLOW][[L-MOUSE][] to place them.",
|
|
||||||
"[YELLOW][[L-MOUSE][] to shoot.",
|
|
||||||
"[yellow][[scrollwheel] to switch weapons.",
|
|
||||||
"",
|
|
||||||
"[GOLD]Every "+wavespace/60+" seconds, a new wave will appear.",
|
|
||||||
"Build turrets to defend the core.",
|
|
||||||
"If the core is destroyed, you lose the game.",
|
|
||||||
"",
|
|
||||||
"[LIME]To collect building resources, move them into the core with conveyors.",
|
|
||||||
"[LIME]Place [ORANGE]drills[] on the right material,they will automatically mine material",
|
|
||||||
"and dump it to nearby conveyors or turrets.",
|
|
||||||
"",
|
|
||||||
"[SCARLET]To produce steel, feed coal and iron into a smelter."
|
|
||||||
};
|
|
||||||
|
|
||||||
public static String[] androidTutorialText = {
|
|
||||||
"[GREEN]Default Controls:",
|
|
||||||
"[WHITE]Use [YELLOW]one finger[] to pan the camera, or two while placing blocks.",
|
|
||||||
"[YELLOW]Hold and tap[] to destroy blocks.",
|
|
||||||
"",
|
|
||||||
"[GOLD]Every "+wavespace/60+" seconds, a new wave will appear.",
|
|
||||||
"Build turrets to defend the core.",
|
|
||||||
"If the core is destroyed, you lose the game.",
|
|
||||||
"",
|
|
||||||
"[LIME]To collect building resources, move them into the core with conveyors.",
|
|
||||||
"[LIME]Place [ORANGE]drills[] on the right material,they will automatically mine material",
|
|
||||||
"and dump it to nearby conveyors or turrets.",
|
|
||||||
"",
|
|
||||||
"[SCARLET]To produce steel, feed coal and iron into a smelter."
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ public class BlastEnemy extends Enemy{
|
|||||||
super.move();
|
super.move();
|
||||||
if(target != null && target.distanceTo(this) < 10f){
|
if(target != null && target.distanceTo(this) < 10f){
|
||||||
Bullet b = new Bullet(BulletType.blast, this, x, y, 0).add();
|
Bullet b = new Bullet(BulletType.blast, this, x, y, 0).add();
|
||||||
b.damage = BulletType.blast.damage + (tier-1) * 50;
|
b.damage = BulletType.blast.damage + (tier-1) * 40;
|
||||||
damage(999);
|
damage(999);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ import com.badlogic.gdx.graphics.Color;
|
|||||||
import com.badlogic.gdx.math.Vector2;
|
import com.badlogic.gdx.math.Vector2;
|
||||||
import com.badlogic.gdx.utils.reflect.ClassReflection;
|
import com.badlogic.gdx.utils.reflect.ClassReflection;
|
||||||
|
|
||||||
import io.anuke.mindustry.Shaders.Outline;
|
import io.anuke.mindustry.Shaders;
|
||||||
import io.anuke.mindustry.Vars;
|
import io.anuke.mindustry.Vars;
|
||||||
import io.anuke.mindustry.ai.Pathfind;
|
import io.anuke.mindustry.ai.Pathfind;
|
||||||
import io.anuke.mindustry.entities.Bullet;
|
import io.anuke.mindustry.entities.Bullet;
|
||||||
@@ -171,10 +171,10 @@ public class Enemy extends DestructibleEntity{
|
|||||||
String region = ClassReflection.getSimpleName(getClass()).toLowerCase() + "-t" + Mathf.clamp(tier, 1, 3);
|
String region = ClassReflection.getSimpleName(getClass()).toLowerCase() + "-t" + Mathf.clamp(tier, 1, 3);
|
||||||
|
|
||||||
//TODO is this really necessary?
|
//TODO is this really necessary?
|
||||||
Graphics.getShader(Outline.class).color.set(tierColors[tier-1]);
|
Shaders.outline.color.set(tierColors[tier-1]);
|
||||||
Graphics.getShader(Outline.class).region = Draw.region(region);
|
Shaders.outline.region = Draw.region(region);
|
||||||
|
|
||||||
Graphics.shader(Outline.class);
|
Graphics.shader(Shaders.outline);
|
||||||
Draw.color();
|
Draw.color();
|
||||||
Draw.rect(region, x, y, direction.angle()-90);
|
Draw.rect(region, x, y, direction.angle()-90);
|
||||||
Graphics.shader();
|
Graphics.shader();
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ import io.anuke.mindustry.Vars;
|
|||||||
import io.anuke.mindustry.world.Map;
|
import io.anuke.mindustry.world.Map;
|
||||||
import io.anuke.mindustry.world.World;
|
import io.anuke.mindustry.world.World;
|
||||||
import io.anuke.ucore.core.Settings;
|
import io.anuke.ucore.core.Settings;
|
||||||
|
import io.anuke.ucore.function.StringSupplier;
|
||||||
import io.anuke.ucore.scene.ui.ButtonGroup;
|
import io.anuke.ucore.scene.ui.ButtonGroup;
|
||||||
import io.anuke.ucore.scene.ui.Dialog;
|
import io.anuke.ucore.scene.ui.Dialog;
|
||||||
import io.anuke.ucore.scene.ui.ImageButton;
|
import io.anuke.ucore.scene.ui.ImageButton;
|
||||||
@@ -53,7 +54,7 @@ public class LevelDialog extends Dialog{
|
|||||||
for(Map map : Map.values()){
|
for(Map map : Map.values()){
|
||||||
if(!map.visible) continue;
|
if(!map.visible) continue;
|
||||||
|
|
||||||
content().add(()->"High Score: [lime]" + Settings.getInt("hiscore" + map.name()));
|
content().add((StringSupplier)(()->"High Score: [lime]" + Settings.getInt("hiscore" + map.name())));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -63,6 +63,7 @@ public class LoadDialog extends Dialog{
|
|||||||
try{
|
try{
|
||||||
SaveIO.loadFromSlot(slot);
|
SaveIO.loadFromSlot(slot);
|
||||||
}catch(Exception e){
|
}catch(Exception e){
|
||||||
|
e.printStackTrace();
|
||||||
Vars.ui.showError("[orange]Save file corrupted or invalid!");
|
Vars.ui.showError("[orange]Save file corrupted or invalid!");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,37 +0,0 @@
|
|||||||
package io.anuke.mindustry.ui;
|
|
||||||
|
|
||||||
import static io.anuke.mindustry.Vars.*;
|
|
||||||
|
|
||||||
import io.anuke.mindustry.GameState;
|
|
||||||
import io.anuke.mindustry.GameState.State;
|
|
||||||
import io.anuke.ucore.core.Settings;
|
|
||||||
import io.anuke.ucore.scene.ui.TextDialog;
|
|
||||||
import io.anuke.ucore.scene.ui.layout.Unit;
|
|
||||||
|
|
||||||
public class TutorialDialog extends TextDialog{
|
|
||||||
|
|
||||||
public TutorialDialog(){
|
|
||||||
super("Tutorial", android ? androidTutorialText : tutorialText);
|
|
||||||
setup();
|
|
||||||
}
|
|
||||||
|
|
||||||
void setup(){
|
|
||||||
setDialog();
|
|
||||||
|
|
||||||
hidden(()->{
|
|
||||||
GameState.set(State.playing);
|
|
||||||
});
|
|
||||||
|
|
||||||
getButtonTable().addButton("OK", ()->{
|
|
||||||
hide();
|
|
||||||
}).pad(2).size(180, 44).units(Unit.dp);
|
|
||||||
|
|
||||||
content().pad(8);
|
|
||||||
|
|
||||||
content().row();
|
|
||||||
content().addCheck("Don't show again", b->{
|
|
||||||
Settings.putBool("tutorial", !b);
|
|
||||||
Settings.save();
|
|
||||||
}).padTop(4);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -60,7 +60,7 @@ public class Generator{
|
|||||||
floor = Blocks.iron;
|
floor = Blocks.iron;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(Noise.nnoise(x, y, 6, 1) > 0.238){
|
if(Noise.nnoise(x, y, 6, 1) > 0.237){
|
||||||
floor = Blocks.coal;
|
floor = Blocks.coal;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -121,10 +121,10 @@ public class ProductionBlocks{
|
|||||||
input = Item.stone;
|
input = Item.stone;
|
||||||
inputAmount = 5;
|
inputAmount = 5;
|
||||||
inputLiquid = Liquid.water;
|
inputLiquid = Liquid.water;
|
||||||
liquidAmount = 19.99f;
|
liquidAmount = 18.99f;
|
||||||
output = Item.coal;
|
output = Item.coal;
|
||||||
health = 50;
|
health = 50;
|
||||||
purifyTime = 70;
|
purifyTime = 60;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ import io.anuke.ucore.core.Timers;
|
|||||||
|
|
||||||
public class Conduit extends Block{
|
public class Conduit extends Block{
|
||||||
protected float liquidCapacity = 10f;
|
protected float liquidCapacity = 10f;
|
||||||
protected float flowfactor = 4f;
|
protected float flowfactor = 4.9f;
|
||||||
|
|
||||||
public Conduit(String name) {
|
public Conduit(String name) {
|
||||||
super(name);
|
super(name);
|
||||||
|
|||||||
Reference in New Issue
Block a user