diff --git a/core/assets/maps/erekirwavemap.msav b/core/assets/maps/erekirwavemap.msav new file mode 100644 index 0000000000..a9ed758571 Binary files /dev/null and b/core/assets/maps/erekirwavemap.msav differ diff --git a/core/src/mindustry/ai/Pathfinder.java b/core/src/mindustry/ai/Pathfinder.java index ccb7260064..9fbb0db8b8 100644 --- a/core/src/mindustry/ai/Pathfinder.java +++ b/core/src/mindustry/ai/Pathfinder.java @@ -23,6 +23,9 @@ public class Pathfinder implements Runnable{ private static final int updateFPS = 60; private static final int updateInterval = 1000 / updateFPS; + /** cached world size */ + static int wwidth, wheight; + static final int impassable = -1; public static final int @@ -66,8 +69,6 @@ public class Pathfinder implements Runnable{ /** maps team, cost, type to flow field*/ Flowfield[][][] cache; - /** cached world size */ - int wwidth, wheight; /** unordered array of path data for iteration only. DO NOT iterate or access this in the main thread. */ Seq threadList = new Seq<>(), mainList = new Seq<>(); /** handles task scheduling on the update thread. */ @@ -438,7 +439,7 @@ public class Pathfinder implements Runnable{ if(cost != impassable){ for(Point2 point : Geometry.d4){ - int dx = (tile % wwidth) + point.x, dy = (tile / wheight) + point.y; + int dx = (tile % wwidth) + point.x, dy = (tile / wwidth) + point.y; if(dx < 0 || dy < 0 || dx >= wwidth || dy >= wheight) continue; diff --git a/core/src/mindustry/content/Blocks.java b/core/src/mindustry/content/Blocks.java index f7f1828d7d..f4dea45557 100644 --- a/core/src/mindustry/content/Blocks.java +++ b/core/src/mindustry/content/Blocks.java @@ -4213,22 +4213,20 @@ public class Blocks{ }}; mechFabricator = new UnitFactory("mech-fabricator"){{ - requirements(Category.units, with(Items.silicon, 200, Items.beryllium, 150)); + requirements(Category.units, with(Items.silicon, 250, Items.beryllium, 200)); size = 3; configurable = false; - plans.add(new UnitPlan(UnitTypes.merui, 60f * 35f, with(Items.beryllium, 40f, Items.silicon, 50f))); - researchCost = with(Items.beryllium, 200, Items.graphite, 80, Items.silicon, 80); + plans.add(new UnitPlan(UnitTypes.merui, 60f * 45f, with(Items.beryllium, 50f, Items.silicon, 70f))); regionSuffix = "-dark"; fogRadius = 3; consumePower(2f); }}; shipFabricator = new UnitFactory("ship-fabricator"){{ - requirements(Category.units, with(Items.silicon, 200, Items.beryllium, 150)); + requirements(Category.units, with(Items.silicon, 200, Items.graphite, 300)); size = 3; configurable = false; - plans.add(new UnitPlan(UnitTypes.osc, 60f * 35f, with(Items.beryllium, 40f, Items.silicon, 50f))); - researchCost = with(Items.beryllium, 200, Items.graphite, 80, Items.silicon, 80); + plans.add(new UnitPlan(UnitTypes.osc, 60f * 40f, with(Items.graphite, 40f, Items.silicon, 70f))); regionSuffix = "-dark"; fogRadius = 3; consumePower(2f); diff --git a/core/src/mindustry/content/UnitTypes.java b/core/src/mindustry/content/UnitTypes.java index 5ec3a8faf0..a6d95d17f1 100644 --- a/core/src/mindustry/content/UnitTypes.java +++ b/core/src/mindustry/content/UnitTypes.java @@ -39,13 +39,13 @@ public class UnitTypes{ //legs public static @EntityDef({Unitc.class, Legsc.class}) UnitType corvus, atrax, merui, latum, anthicus, - bulwark, krepost; + bulwark, krepost; //TODO horrid name here //legs, legacy public static @EntityDef(value = {Unitc.class, Legsc.class}, legacy = true) UnitType spiroct, arkyid, toxopid; //hover - public static @EntityDef({Unitc.class, ElevationMovec.class}) UnitType osc; + public static @EntityDef({Unitc.class, ElevationMovec.class}) UnitType osc; //TODO bad name //air public static @EntityDef({Unitc.class}) UnitType flare, eclipse, horizon, zenith, antumbra, @@ -2679,7 +2679,7 @@ public class UnitTypes{ bullet = new BasicBulletType(8f, 140){{ sprite = "missile-large"; width = 9.5f; - height = 15f; + height = 13f; lifetime = 18f; hitSize = 6f; shootEffect = Fx.shootTitan; @@ -2702,7 +2702,7 @@ public class UnitTypes{ fragVelocityMin = 1f; //TODO - fragBullet = new BasicBulletType(8f, 30){{ + fragBullet = new BasicBulletType(8f, 25){{ sprite = "missile-large"; width = 8f; height = 12f; diff --git a/core/src/mindustry/maps/Maps.java b/core/src/mindustry/maps/Maps.java index a2861ad702..b8ea2f08c5 100644 --- a/core/src/mindustry/maps/Maps.java +++ b/core/src/mindustry/maps/Maps.java @@ -36,7 +36,7 @@ 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", "moltenLake", "archipelago", "debrisField", "veins", "glacier", "passage"}; + private static String[] defaultMapNames = {"maze", "fortress", "labyrinth", "islands", "tendrils", "caldera", "wasteland", "shattered", "fork", "triad", "mudFlats", "moltenLake", "archipelago", "debrisField", "erekirwavemap", "veins", "glacier", "passage"}; /** Maps tagged as PvP */ private static String[] pvpMaps = {"veins", "glacier", "passage"}; diff --git a/core/src/mindustry/ui/dialogs/CustomRulesDialog.java b/core/src/mindustry/ui/dialogs/CustomRulesDialog.java index 489ba0f716..435007824a 100644 --- a/core/src/mindustry/ui/dialogs/CustomRulesDialog.java +++ b/core/src/mindustry/ui/dialogs/CustomRulesDialog.java @@ -141,7 +141,7 @@ public class CustomRulesDialog extends BaseDialog{ check("@rules.waves", b -> rules.waves = b, () -> rules.waves); check("@rules.wavetimer", b -> rules.waveTimer = b, () -> rules.waveTimer); check("@rules.waitForWaveToEnd", b -> rules.waitEnemies = b, () -> rules.waitEnemies); - number("@rules.wavespacing", false, f -> rules.waveSpacing = f * 60f, () -> rules.waveSpacing / 60f, () -> true, 1, Float.MAX_VALUE); + number("@rules.wavespacing", false, f -> rules.waveSpacing = f * 60f, () -> rules.waveSpacing / 60f, () -> rules.waveTimer, 1, Float.MAX_VALUE); //this is experimental, because it's not clear that 0 makes it default. if(experimental){ number("@rules.initialwavespacing", false, f -> rules.initialWaveSpacing = f * 60f, () -> rules.initialWaveSpacing / 60f, () -> true, 0, Float.MAX_VALUE); diff --git a/core/src/mindustry/world/blocks/ItemSelection.java b/core/src/mindustry/world/blocks/ItemSelection.java index d4eeadaf12..4de74450fd 100644 --- a/core/src/mindustry/world/blocks/ItemSelection.java +++ b/core/src/mindustry/world/blocks/ItemSelection.java @@ -38,7 +38,7 @@ public class ItemSelection{ int i = 0; for(T item : items){ - if(!item.unlockedNow() || (item instanceof Item checkVisible && state.rules.hiddenBuildItems.contains(checkVisible))) continue; + if(!item.unlockedNow() || (item instanceof Item checkVisible && state.rules.hiddenBuildItems.contains(checkVisible)) || item.isHidden()) continue; ImageButton button = cont.button(Tex.whiteui, Styles.clearToggleTransi, 24, () -> { if(closeSelect) control.input.config.hideConfig();