New map / Unit stat tweaks / FileChooser keyboard input

This commit is contained in:
Anuken 2020-10-21 20:32:35 -04:00
parent a80d0cc457
commit f0d74e2705
12 changed files with 28 additions and 15 deletions

Binary file not shown.

Binary file not shown.

View File

@ -10,7 +10,7 @@ uniform vec3 u_ambientColor;
varying vec4 v_col;
const vec3 diffuse = vec3(0);
const vec3 diffuse = vec3(0.01);
const float shinefalloff = 4.0;
const float shinelen = 0.2;

View File

@ -1145,7 +1145,7 @@ public class UnitTypes implements ContentList{
flying = true;
drag = 0.05f;
speed = 1.9f;
speed = 2.6f;
rotateSpeed = 15f;
accel = 0.1f;
range = 130f;
@ -1201,7 +1201,7 @@ public class UnitTypes implements ContentList{
mineTier = 3;
health = 500;
armor = 5f;
speed = 1.8f;
speed = 2.3f;
accel = 0.06f;
drag = 0.017f;
lowAltitude = true;
@ -1235,7 +1235,7 @@ public class UnitTypes implements ContentList{
quad = new UnitType("quad"){{
armor = 8f;
health = 6000;
speed = 1.2f;
speed = 1.4f;
rotateSpeed = 2f;
accel = 0.05f;
drag = 0.017f;
@ -1300,7 +1300,7 @@ public class UnitTypes implements ContentList{
oct = new UnitType("oct"){{
armor = 16f;
health = 24000;
speed = 0.6f;
speed = 0.8f;
rotateSpeed = 1f;
accel = 0.04f;
drag = 0.018f;

View File

@ -23,14 +23,14 @@ public class Fires{
if(fire == null){
fire = Fire.create();
fire.tile(tile);
fire.lifetime(baseLifetime);
fire.tile = tile;
fire.lifetime = baseLifetime;
fire.set(tile.worldx(), tile.worldy());
fire.add();
map.put(tile.pos(), fire);
}else{
fire.lifetime(baseLifetime);
fire.time(0f);
fire.lifetime = baseLifetime;
fire.time = 0f;
}
}

View File

@ -704,7 +704,7 @@ public class LStatements{
@RegisterStatement("ubind")
public static class UnitBindStatement extends LStatement{
public String type = "@mono";
public String type = "@poly";
@Override
public void build(Table table){

View File

@ -29,7 +29,7 @@ import static mindustry.Vars.*;
public class Maps{
/** List of all built-in maps. Filenames only. */
private static String[] defaultMapNames = {"maze", "fortress", "labyrinth", "islands", "tendrils", "caldera", "wasteland", "shattered", "fork", "triad", "mudFlats", "veins", "glacier"};
private static String[] defaultMapNames = {"maze", "fortress", "labyrinth", "islands", "tendrils", "caldera", "wasteland", "shattered", "fork", "triad", "mudFlats", "moltenLake", "veins", "glacier"};
/** Maps tagged as PvP */
static final String[] pvpMaps = {"veins", "glacier"};
/** All maps stored in an ordered array. */

View File

@ -19,7 +19,7 @@ public class NoiseFilter extends GenerateFilter{
new SliderOption("octaves", () -> octaves, f -> octaves = f, 1f, 10f),
new SliderOption("falloff", () -> falloff, f -> falloff = f, 0f, 1f),
new BlockOption("floor", () -> floor, b -> floor = b, floorsOnly),
new BlockOption("wall", () -> block, b -> block = b, wallsOnly)
new BlockOption("wall", () -> block, b -> block = b, wallsOptional)
);
}
@ -29,7 +29,7 @@ public class NoiseFilter extends GenerateFilter{
if(noise > threshold){
in.floor = floor;
if(wallsOnly.get(in.block)) in.block = block;
if(in.block != Blocks.air) in.block = block;
}
}
}

View File

@ -171,6 +171,8 @@ public class UnitType extends UnlockableContent{
if(unit.controller() instanceof LogicAI){
table.row();
table.add(Blocks.microProcessor.emoji() + " " + Core.bundle.get("units.processorcontrol")).growX().left();
table.row();
table.label(() -> Iconc.settings + " " + (long)unit.flag + "").color(Color.lightGray).growX().wrap().left();
}
table.row();

View File

@ -4,6 +4,7 @@ import arc.*;
import arc.files.*;
import arc.func.*;
import arc.graphics.g2d.*;
import arc.input.*;
import arc.scene.event.*;
import arc.scene.ui.*;
import arc.scene.ui.layout.*;
@ -45,6 +46,16 @@ public class FileChooser extends BaseDialog{
cont.clear();
setupWidgets();
});
keyDown(KeyCode.enter, () -> {
ok.fireClick();
});
keyDown(key -> {
if(key == KeyCode.escape || key == KeyCode.back){
Core.app.post(this::hide);
}
});
}
private void setupWidgets(){

View File

@ -128,7 +128,7 @@ public class PlanetDialog extends BaseDialog implements PlanetInterfaceRenderer{
boolean canSelect(Sector sector){
if(mode == select) return sector.hasBase();
return sector.hasBase() || sector.near().contains(Sector::hasBase)//(sector.tile.v.within(launchSector.tile.v, (launchRange + 0.5f) * planets.planet.sectorApproxRadius*2) //within range
return sector.hasBase() || sector.near().contains(Sector::hasBase) //near an occupied sector
|| (sector.preset != null && sector.preset.unlocked()); //is an unlocked preset
}

View File

@ -1,3 +1,3 @@
org.gradle.daemon=true
org.gradle.jvmargs=-Xms256m -Xmx1024m
archash=4965359d2857f529f7010c73bc89876d347fa424
archash=b6e614dd1c272073a420aa946797118ea6b48324