Added additional info to block descriptions
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="5"
|
android:versionCode="6"
|
||||||
android:versionName="1.1.1" >
|
android:versionName="1.1.2" >
|
||||||
|
|
||||||
<uses-sdk android:minSdkVersion="9" android:targetSdkVersion="25" />
|
<uses-sdk android:minSdkVersion="9" android:targetSdkVersion="25" />
|
||||||
|
|
||||||
|
|||||||
@@ -6,20 +6,26 @@ import com.badlogic.gdx.Gdx;
|
|||||||
import io.anuke.mindustry.entities.Player;
|
import io.anuke.mindustry.entities.Player;
|
||||||
import io.anuke.ucore.scene.ui.layout.Unit;
|
import io.anuke.ucore.scene.ui.layout.Unit;
|
||||||
|
|
||||||
/**ick, global state*/
|
|
||||||
public class Vars{
|
public class Vars{
|
||||||
|
//shorthand for whether or not this is running on android
|
||||||
public static final boolean android = (Gdx.app.getType() == ApplicationType.Android);
|
public static final boolean android = (Gdx.app.getType() == ApplicationType.Android);
|
||||||
|
//how far away from the player blocks can be placed
|
||||||
public static final float placerange = 66;
|
public static final float placerange = 66;
|
||||||
|
//respawn time in frames
|
||||||
public static final float respawnduration = 60*4;
|
public static final float respawnduration = 60*4;
|
||||||
|
//time between waves in frames
|
||||||
public static final float wavespace = 20*60*(android ? 2 : 1);
|
public static final float wavespace = 20*60*(android ? 2 : 1);
|
||||||
|
//how far away from spawn points the player can't place blocks
|
||||||
public static final float enemyspawnspace = 65;
|
public static final float enemyspawnspace = 65;
|
||||||
|
//scale of the font
|
||||||
public static final float fontscale = Unit.dp.inPixels(1f)/2f;
|
public static final float fontscale = Unit.dp.inPixels(1f)/2f;
|
||||||
|
//camera zoom displayed on startup
|
||||||
public static final int baseCameraScale = Math.round(Unit.dp.inPixels(4));
|
public static final int baseCameraScale = Math.round(Unit.dp.inPixels(4));
|
||||||
|
//how much the zoom changes every zoom button press
|
||||||
public static final int zoomScale = Math.round(Unit.dp.inPixels(1));
|
public static final int zoomScale = Math.round(Unit.dp.inPixels(1));
|
||||||
|
//if true, player speed will be increased, massive amounts of resources will be given on start, and other debug options will be available
|
||||||
public static boolean debug = false;
|
public static boolean debug = false;
|
||||||
|
//number of save slots-- increasing may lead to layout issues
|
||||||
public static final int saveSlots = 4;
|
public static final int saveSlots = 4;
|
||||||
|
|
||||||
//turret and enemy shoot speed inverse multiplier
|
//turret and enemy shoot speed inverse multiplier
|
||||||
|
|||||||
@@ -72,6 +72,26 @@ public class Enemy extends DestructibleEntity{
|
|||||||
out.damage = bullet.damage*Vars.multiplier;
|
out.damage = bullet.damage*Vars.multiplier;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void findClosestNode(){
|
||||||
|
Pathfind.find(this);
|
||||||
|
|
||||||
|
int index = 0;
|
||||||
|
int cindex = -1;
|
||||||
|
float dst = Float.MAX_VALUE;
|
||||||
|
|
||||||
|
|
||||||
|
for(Tile tile : path){
|
||||||
|
if(Vector2.dst(tile.worldx(), tile.worldy(), x, y) < dst){
|
||||||
|
dst = Vector2.dst(tile.worldx(), tile.worldy(), x, y);
|
||||||
|
cindex = index;
|
||||||
|
}
|
||||||
|
|
||||||
|
index ++;
|
||||||
|
}
|
||||||
|
|
||||||
|
node = cindex;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean collides(SolidEntity other){
|
public boolean collides(SolidEntity other){
|
||||||
return (other instanceof Bullet) && !(((Bullet)other).owner instanceof Enemy);
|
return (other instanceof Bullet) && !(((Bullet)other).owner instanceof Enemy);
|
||||||
|
|||||||
@@ -302,6 +302,7 @@ public class SaveIO{
|
|||||||
|
|
||||||
try{
|
try{
|
||||||
Enemy enemy = (Enemy)ClassReflection.getConstructor(idEnemies.get(type), int.class).newInstance(lane);
|
Enemy enemy = (Enemy)ClassReflection.getConstructor(idEnemies.get(type), int.class).newInstance(lane);
|
||||||
|
enemy.findClosestNode();
|
||||||
enemy.health = health;
|
enemy.health = health;
|
||||||
enemy.x = x;
|
enemy.x = x;
|
||||||
enemy.y = y;
|
enemy.y = y;
|
||||||
|
|||||||
@@ -56,6 +56,6 @@ public class RepairTurret extends Turret{
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String description(){
|
public String description(){
|
||||||
return "Heals nearby tiles.";
|
return "[green]Range: " + (int)range + "\n[orange]Heals nearby tiles.";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -74,7 +74,7 @@ public class Turret extends Block{
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String description(){
|
public String description(){
|
||||||
return "[green]Ammo: "+(ammo==null ? "N/A" : ammo.name())+"\n[]Shoots things.";
|
return "[green]Ammo: "+(ammo==null ? "N/A" : ammo.name())+"\nRange: " + (int)range + "\nDamage: " + bullet.damage;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
Reference in New Issue
Block a user