From c5ec8ff3cea994239e4abce8f47043863c83a94a Mon Sep 17 00:00:00 2001 From: Anuken Date: Sat, 19 Feb 2022 15:32:55 -0500 Subject: [PATCH] Cheaper initial erekir research --- core/src/mindustry/content/Blocks.java | 6 ++++-- core/src/mindustry/game/FogControl.java | 14 ++++++++------ core/src/mindustry/graphics/FogRenderer.java | 1 + 3 files changed, 13 insertions(+), 8 deletions(-) diff --git a/core/src/mindustry/content/Blocks.java b/core/src/mindustry/content/Blocks.java index 905b0de9f1..514d4787a4 100644 --- a/core/src/mindustry/content/Blocks.java +++ b/core/src/mindustry/content/Blocks.java @@ -1874,6 +1874,7 @@ public class Blocks{ buildVisibility = BuildVisibility.berylliumOnly; health = 90; speed = 4f; + researchCostMultiplier = 1f / 12f; }}; ductRouter = new DuctRouter("duct-router"){{ @@ -2289,7 +2290,7 @@ public class Blocks{ hasLiquids = true; outputLiquid = new LiquidStack(Liquids.water, 5f / 60f / 9f); liquidCapacity = 20f; - researchCostMultiplier = 0.18f; + researchCostMultiplier = 0.18f / 13f; }}; //TODO rename @@ -2495,7 +2496,7 @@ public class Blocks{ tier = 3; size = 2; range = 4; - researchCostMultiplier = 0.18f; + researchCostMultiplier = 0.18f / 12f; consumeLiquid(Liquids.hydrogen, 0.25f / 60f).boost(); }}; @@ -3213,6 +3214,7 @@ public class Blocks{ shootCone = 3f; scaledHealth = 280; rotateSpeed = 1.6f; + researchCostMultiplier = 0.3f; coolant = consume(new ConsumeLiquid(Liquids.water, 15f / 60f)); limitRange(); diff --git a/core/src/mindustry/game/FogControl.java b/core/src/mindustry/game/FogControl.java index 8c53a62d4d..5367e79623 100644 --- a/core/src/mindustry/game/FogControl.java +++ b/core/src/mindustry/game/FogControl.java @@ -63,7 +63,7 @@ public class FogControl implements CustomChunk{ if(state.rules.fog && event.tile.build != null && event.tile.isCenter() && !event.tile.build.team.isAI() && event.tile.block().flags.contains(BlockFlag.hasFogRadius)){ var data = data(event.tile.team()); if(data != null){ - data.dynamicUpdated = true; + data.dynamicUpdated = data.dynamicUpdatedClient = true; } synchronized(staticEvents){ @@ -78,7 +78,7 @@ public class FogControl implements CustomChunk{ if(state.rules.fog && e.tile.build != null && !e.tile.build.team.isAI() && e.tile.block().flags.contains(BlockFlag.hasFogRadius)){ var data = data(e.tile.team()); if(data != null){ - data.dynamicUpdated = true; + data.dynamicUpdated = data.dynamicUpdatedClient = true; } } }); @@ -161,7 +161,7 @@ public class FogControl implements CustomChunk{ if(data == null){ data = fog[team.team.id] = new FogData(); - data.dynamicUpdated = true; + data.dynamicUpdated = data.dynamicUpdatedClient = true; } synchronized(staticEvents){ @@ -176,7 +176,7 @@ public class FogControl implements CustomChunk{ if(unit.lastFogPos != pos){ pushEvent(event); unit.lastFogPos = pos; - data.dynamicUpdated = true; + data.dynamicUpdated = data.dynamicUpdatedClient = true; } } } @@ -187,9 +187,9 @@ public class FogControl implements CustomChunk{ } //on the client, let the renderer know of all the fog sources - //TODO this runs at a lower FPS and hence may look bad...? - if(data.dynamicUpdated && !headless && team.team == Vars.player.team()){ + if(data.dynamicUpdatedClient && !headless && team.team == Vars.player.team()){ renderer.fog.flushDynamic(unitEventQueue); + data.dynamicUpdatedClient = false; } //if it's time for an update, flush *everything* onto the update queue @@ -480,6 +480,8 @@ public class FogControl implements CustomChunk{ /** if true, a dynamic fog update must be scheduled. */ boolean dynamicUpdated; + boolean dynamicUpdatedClient; + FogData(){ int len = ww * wh; diff --git a/core/src/mindustry/graphics/FogRenderer.java b/core/src/mindustry/graphics/FogRenderer.java index 969cdd0b4b..6a7f5958de 100644 --- a/core/src/mindustry/graphics/FogRenderer.java +++ b/core/src/mindustry/graphics/FogRenderer.java @@ -74,6 +74,7 @@ public class FogRenderer{ //TODO render all (clipped) view circles + dynamicFog.end(); ScissorStack.pop(); Draw.proj(Core.camera); }