diff --git a/core/assets/bundles/bundle.properties b/core/assets/bundles/bundle.properties index ca33ac045b..2bd0b64eaf 100644 --- a/core/assets/bundles/bundle.properties +++ b/core/assets/bundles/bundle.properties @@ -720,6 +720,7 @@ bar.corereq = Core Base Required bar.drillspeed = Drill Speed: {0}/s bar.pumpspeed = Pump Speed: {0}/s bar.efficiency = Efficiency: {0}% +bar.boost = Boost: {0}% bar.powerbalance = Power: {0}/s bar.powerstored = Stored: {0}/{1} bar.poweramount = Power: {0} @@ -935,6 +936,7 @@ mode.custom = Custom Rules rules.infiniteresources = Infinite Resources rules.reactorexplosions = Reactor Explosions +rules.coreincinerates = Core Incinerates Overflow rules.schematic = Schematics Allowed rules.wavetimer = Wave Timer rules.waves = Waves diff --git a/core/src/mindustry/ui/dialogs/CustomRulesDialog.java b/core/src/mindustry/ui/dialogs/CustomRulesDialog.java index 6026232f39..2e6d923063 100644 --- a/core/src/mindustry/ui/dialogs/CustomRulesDialog.java +++ b/core/src/mindustry/ui/dialogs/CustomRulesDialog.java @@ -141,6 +141,7 @@ public class CustomRulesDialog extends BaseDialog{ check("@rules.infiniteresources", b -> rules.infiniteResources = b, () -> rules.infiniteResources); check("@rules.reactorexplosions", b -> rules.reactorExplosions = b, () -> rules.reactorExplosions); check("@rules.schematic", b -> rules.schematicsAllowed = b, () -> rules.schematicsAllowed); + check("@rules.coreincinerates", b -> rules.coreIncinerates = b, () -> rules.coreIncinerates); number("@rules.buildcostmultiplier", false, f -> rules.buildCostMultiplier = f, () -> rules.buildCostMultiplier, () -> !rules.infiniteResources); number("@rules.buildspeedmultiplier", f -> rules.buildSpeedMultiplier = f, () -> rules.buildSpeedMultiplier, 0.001f, 50f); number("@rules.deconstructrefundmultiplier", false, f -> rules.deconstructRefundMultiplier = f, () -> rules.deconstructRefundMultiplier, () -> !rules.infiniteResources); diff --git a/core/src/mindustry/world/blocks/campaign/LaunchPad.java b/core/src/mindustry/world/blocks/campaign/LaunchPad.java index d0804bd4cf..838efde720 100644 --- a/core/src/mindustry/world/blocks/campaign/LaunchPad.java +++ b/core/src/mindustry/world/blocks/campaign/LaunchPad.java @@ -32,7 +32,7 @@ public class LaunchPad extends Block{ public Sound launchSound = Sounds.none; public @Load("@-light") TextureRegion lightRegion; - public @Load("launchpod") TextureRegion podRegion; + public @Load(value = "@-pod", fallback = "launchpod") TextureRegion podRegion; public Color lightColor = Color.valueOf("eab678"); public LaunchPad(String name){ @@ -200,7 +200,7 @@ public class LaunchPad extends Block{ Draw.z(Layer.weather - 1); - TextureRegion region = Core.atlas.find("launchpod"); + TextureRegion region = blockOn() instanceof mindustry.world.blocks.campaign.LaunchPad p ? p.podRegion : Core.atlas.find("launchpod"); float rw = region.width * Draw.scl * scale, rh = region.height * Draw.scl * scale; Draw.alpha(alpha); diff --git a/core/src/mindustry/world/blocks/defense/OverdriveProjector.java b/core/src/mindustry/world/blocks/defense/OverdriveProjector.java index ad845991c7..5066186e71 100644 --- a/core/src/mindustry/world/blocks/defense/OverdriveProjector.java +++ b/core/src/mindustry/world/blocks/defense/OverdriveProjector.java @@ -1,5 +1,6 @@ package mindustry.world.blocks.defense; +import arc.*; import arc.graphics.*; import arc.graphics.g2d.*; import arc.math.*; @@ -9,6 +10,7 @@ import mindustry.annotations.Annotations.*; import mindustry.gen.*; import mindustry.graphics.*; import mindustry.logic.*; +import mindustry.ui.*; import mindustry.world.*; import mindustry.world.meta.*; @@ -62,6 +64,12 @@ public class OverdriveProjector extends Block{ } } + @Override + public void setBars(){ + super.setBars(); + bars.add("boost", (OverdriveBuild entity) -> new Bar(() -> Core.bundle.format("bar.boost", (int)(entity.realBoost() * 100)), () -> Pal.accent, () -> entity.realBoost() / (hasBoost ? speedBoost + speedBoostPhase : speedBoost))); + } + public class OverdriveBuild extends Building implements Ranged{ float heat; float charge = Mathf.random(reload); @@ -88,17 +96,20 @@ public class OverdriveProjector extends Block{ phaseHeat = Mathf.lerpDelta(phaseHeat, Mathf.num(cons.optionalValid()), 0.1f); } + if(charge >= reload){ + float realRange = range + phaseHeat * phaseRangeBoost; + + charge = 0f; + indexer.eachBlock(this, realRange, other -> true, other -> other.applyBoost(realBoost(), reload + 1f)); + } + if(timer(timerUse, useTime) && efficiency() > 0 && consValid()){ consume(); } + } - if(charge >= reload){ - float realRange = range + phaseHeat * phaseRangeBoost; - float realBoost = (speedBoost + phaseHeat * speedBoostPhase) * efficiency(); - - charge = 0f; - indexer.eachBlock(this, realRange, other -> true, other -> other.applyBoost(realBoost, reload + 1f)); - } + public float realBoost(){ + return consValid() ? (speedBoost + phaseHeat * speedBoostPhase) * efficiency() : 0f; } @Override diff --git a/core/src/mindustry/world/blocks/storage/CoreBlock.java b/core/src/mindustry/world/blocks/storage/CoreBlock.java index 677c3a83b6..13e84e1dd8 100644 --- a/core/src/mindustry/world/blocks/storage/CoreBlock.java +++ b/core/src/mindustry/world/blocks/storage/CoreBlock.java @@ -296,17 +296,17 @@ public class CoreBlock extends StorageBlock{ @Override public void drawSelect(){ Lines.stroke(1f, Pal.accent); - Cons outline = t -> { + Cons outline = b -> { for(int i = 0; i < 4; i++){ Point2 p = Geometry.d8edge[i]; - float offset = -Math.max(t.block.size - 1, 0) / 2f * tilesize; - Draw.rect("block-select", t.x + offset * p.x, t.y + offset * p.y, i * 90); + float offset = -Math.max(b.block.size - 1, 0) / 2f * tilesize; + Draw.rect("block-select", b.x + offset * p.x, b.y + offset * p.y, i * 90); } }; - if(proximity.contains(e -> owns(e) && e.items == items)){ - outline.get(this); - } - proximity.each(e -> owns(e) && e.items == items, outline); + team.cores().each(core -> { + outline.get(core); + core.proximity.each(storage -> storage.items == items, outline); + }); Draw.reset(); } diff --git a/servers_v6.json b/servers_v6.json index ff486ea497..115b18db01 100644 --- a/servers_v6.json +++ b/servers_v6.json @@ -35,10 +35,6 @@ "name": "TWS", "address": ["twsmindustry.24x7.hk:6701", "twsmindustry.24x7.hk:6702"] }, - { - "address": "cheginde.ddns.net" - - }, { "name": "mindustry.ddns.net", "address": ["mindustry.ddns.net:1000", "mindustry.ddns.net:2000", "mindustry.ddns.net:3000", "mindustry.ddns.net:4000"]