mirror of
https://github.com/Anuken/Mindustry.git
synced 2025-02-10 18:57:39 +07:00
New map / Unit stat tweaks / FileChooser keyboard input
This commit is contained in:
parent
a80d0cc457
commit
f0d74e2705
BIN
core/assets/maps/moltenLake.msav
Normal file
BIN
core/assets/maps/moltenLake.msav
Normal file
Binary file not shown.
Binary file not shown.
@ -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;
|
||||
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -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){
|
||||
|
@ -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. */
|
||||
|
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -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();
|
||||
|
@ -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(){
|
||||
|
@ -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
|
||||
}
|
||||
|
||||
|
@ -1,3 +1,3 @@
|
||||
org.gradle.daemon=true
|
||||
org.gradle.jvmargs=-Xms256m -Xmx1024m
|
||||
archash=4965359d2857f529f7010c73bc89876d347fa424
|
||||
archash=b6e614dd1c272073a420aa946797118ea6b48324
|
||||
|
Loading…
Reference in New Issue
Block a user