diff --git a/core/assets/bundles/bundle.properties b/core/assets/bundles/bundle.properties index b3f3f44fd6..811a2c8627 100644 --- a/core/assets/bundles/bundle.properties +++ b/core/assets/bundles/bundle.properties @@ -1681,6 +1681,7 @@ laccess.dead = Whether a unit/building is dead or no longer valid. laccess.controlled = Returns:\n[accent]@ctrlProcessor[] if unit controller is processor\n[accent]@ctrlPlayer[] if unit/building controller is player\n[accent]@ctrlFormation[] if unit is in formation\nOtherwise, 0. laccess.commanded = [red]Deprecated. Will be removed![]\nUse [accent]controlled[] instead. laccess.progress = Action progress, 0 to 1.\nReturns production, turret reload or construction progress. +lacess.speed = Top speed of a unit, in tiles/sec. graphicstype.clear = Fill the display with a color. graphicstype.color = Set color for next drawing operations. diff --git a/core/src/mindustry/content/Blocks.java b/core/src/mindustry/content/Blocks.java index fad5a899bc..465719efff 100644 --- a/core/src/mindustry/content/Blocks.java +++ b/core/src/mindustry/content/Blocks.java @@ -997,7 +997,7 @@ public class Blocks{ liquidCapacity = 50f; - consumes.liquid(Liquids.water, 5f / 60f); + consumes.liquid(Liquids.water, 10f / 60f); consumes.power(2f); drawer = new DrawMulti( @@ -1021,7 +1021,8 @@ public class Blocks{ ); drawer.iconOverride = new String[]{"-bottom", ""}; - outputLiquids = LiquidStack.with(Liquids.ozone, 2f * craftTime / 60, Liquids.hydrogen, 3f * craftTime / 60); + continuousLiquidOutput = true; + outputLiquids = LiquidStack.with(Liquids.ozone, 2f * 2f / 60, Liquids.hydrogen, 2f * 3f / 60); liquidOutputDirections = new int[]{1, 3}; }}; @@ -1055,7 +1056,7 @@ public class Blocks{ outputItem = new ItemStack(Items.oxide, 1); - consumes.liquid(Liquids.ozone, 1f / 60f); + consumes.liquid(Liquids.ozone, 2f / 60f); consumes.item(Items.beryllium); consumes.power(1f); @@ -1076,7 +1077,7 @@ public class Blocks{ rotateDraw = false; drawer.iconOverride = new String[]{""}; size = 2; - heatOutput = 2f; + heatOutput = 3f; consumes.power(0.5f / 60f); }}; @@ -2043,7 +2044,7 @@ public class Blocks{ ambientSoundVolume = 0.06f; }}; - //TODO coolr name? + //TODO cooler name? pyrolysisGenerator = new ConsumeGenerator("pyrolysis-generator"){{ //TODO requirements requirements(Category.power, with(Items.graphite, 50, Items.carbide, 50, Items.oxide, 60f, Items.silicon, 50)); @@ -2182,7 +2183,7 @@ public class Blocks{ consumes.liquid(Liquids.water, 0.15f); }}; - //TODO output heat + //TODO output heat? ventCondenser = new AttributeCrafter("vent-condenser"){{ requirements(Category.production, with(Items.graphite, 20, Items.beryllium, 60)); attribute = Attribute.vent; @@ -2201,7 +2202,7 @@ public class Blocks{ boostScale = 1f / 9f; outputLiquid = new LiquidStack(Liquids.water, 30f / 60f); consumes.power(0.5f); - liquidCapacity = 20f; + liquidCapacity = 60f; }}; cliffCrusher = new WallCrafter("cliff-crusher"){{ diff --git a/core/src/mindustry/entities/comp/UnitComp.java b/core/src/mindustry/entities/comp/UnitComp.java index 3f8f9f7d50..5e45220d68 100644 --- a/core/src/mindustry/entities/comp/UnitComp.java +++ b/core/src/mindustry/entities/comp/UnitComp.java @@ -185,6 +185,7 @@ abstract class UnitComp implements Healthc, Physicsc, Hitboxc, Statusc, Teamc, I case mineX -> mining() ? mineTile.x : -1; case mineY -> mining() ? mineTile.y : -1; case flag -> flag; + case speed -> type.speed * 60f / tilesize; case controlled -> !isValid() ? 0 : controller instanceof LogicAI ? ctrlProcessor : controller instanceof Player ? ctrlPlayer : diff --git a/core/src/mindustry/game/Rules.java b/core/src/mindustry/game/Rules.java index 17a3692646..4e01e48435 100644 --- a/core/src/mindustry/game/Rules.java +++ b/core/src/mindustry/game/Rules.java @@ -51,6 +51,8 @@ public class Rules{ public boolean unitAmmo = false; /** Whether cores add to unit limit */ public boolean unitCapVariable = true; + /** If true, unit spawn points are shown. */ + public boolean showSpawns = false; /** How fast unit factories build units. */ public float unitBuildSpeedMultiplier = 1f; /** How much damage any other units deal. */ diff --git a/core/src/mindustry/graphics/MinimapRenderer.java b/core/src/mindustry/graphics/MinimapRenderer.java index 0b8164edee..8f43b150ec 100644 --- a/core/src/mindustry/graphics/MinimapRenderer.java +++ b/core/src/mindustry/graphics/MinimapRenderer.java @@ -113,6 +113,33 @@ public class MinimapRenderer{ } } + Draw.reset(); + if(withLabels){ + drawSpawns(x, y, w, h, scaling); + } + } + + public void drawSpawns(float x, float y, float w, float h, float scaling){ + if(!state.rules.showSpawns || !state.hasSpawns() || !state.rules.waves) return; + + TextureRegion icon = Icon.units.getRegion(); + + Lines.stroke(3f); + + Draw.color(state.rules.waveTeam.color, Tmp.c2.set(state.rules.waveTeam.color).value(1.2f), Mathf.absin(Time.time, 16f, 1f)); + + for(Tile tile : spawner.getSpawns()){ + float tx = ((tile.x + 0.5f) / world.width()) * w; + float ty = ((tile.y + 0.5f) / world.height()) * h; + + float rad = (state.rules.dropZoneRadius / (baseSize / 2f)) * 5f * scaling; + float curve = Mathf.curve(Time.time % 240f, 120f, 240f); + + Draw.rect(icon, x + tx, y + ty, icon.width, icon.height); + Lines.circle(x + tx, y + ty, rad); + if(curve > 0f) Lines.circle(x + tx, y + ty, rad * Interp.pow3Out.apply(curve)); + } + Draw.reset(); } diff --git a/core/src/mindustry/logic/LAccess.java b/core/src/mindustry/logic/LAccess.java index baf4068707..837601b8cb 100644 --- a/core/src/mindustry/logic/LAccess.java +++ b/core/src/mindustry/logic/LAccess.java @@ -36,6 +36,7 @@ public enum LAccess{ mineX, mineY, mining, + speed, team, type, flag, diff --git a/core/src/mindustry/maps/planet/ErekirPlanetGenerator.java b/core/src/mindustry/maps/planet/ErekirPlanetGenerator.java index d945fb908f..e6e99807b2 100644 --- a/core/src/mindustry/maps/planet/ErekirPlanetGenerator.java +++ b/core/src/mindustry/maps/planet/ErekirPlanetGenerator.java @@ -248,7 +248,8 @@ public class ErekirPlanetGenerator extends PlanetGenerator{ state.rules.defaultTeam.items().add(Seq.with(ItemStack.with(Items.beryllium, 300, Items.graphite, 300))); //TODO proper waves - state.rules.waves = !OS.hasProp("mindustry.debug"); + state.rules.waves = false; + state.rules.showSpawns = true; state.rules.waveTimer = true; state.rules.waveSpacing = 60f * 60f * 10f; state.rules.spawns = Seq.with(new SpawnGroup(){{ diff --git a/core/src/mindustry/ui/fragments/MinimapFragment.java b/core/src/mindustry/ui/fragments/MinimapFragment.java index 07536f2e3c..8259a8232e 100644 --- a/core/src/mindustry/ui/fragments/MinimapFragment.java +++ b/core/src/mindustry/ui/fragments/MinimapFragment.java @@ -35,6 +35,7 @@ public class MinimapFragment extends Fragment{ float ratio = (float)renderer.minimap.getTexture().height / renderer.minimap.getTexture().width; TextureRegion reg = Draw.wrap(renderer.minimap.getTexture()); Draw.rect(reg, w/2f + panx*zoom, h/2f + pany*zoom, size, size * ratio); + renderer.minimap.drawEntities(w/2f + panx*zoom - size/2f, h/2f + pany*zoom - size/2f * ratio, size, size * ratio, zoom, true); }