From 95a6850ce5c9436f2227ac84799aad5dd3e84fd8 Mon Sep 17 00:00:00 2001 From: Anuken Date: Tue, 15 Jul 2025 10:58:20 -0400 Subject: [PATCH] Reverted power node build time multiplier / No mono global selection --- core/src/mindustry/content/Blocks.java | 1 - core/src/mindustry/content/UnitTypes.java | 1 + core/src/mindustry/input/DesktopInput.java | 6 +++--- core/src/mindustry/type/UnitType.java | 2 ++ gradle.properties | 2 +- 5 files changed, 7 insertions(+), 5 deletions(-) diff --git a/core/src/mindustry/content/Blocks.java b/core/src/mindustry/content/Blocks.java index a935307e19..ed97b6c8d0 100644 --- a/core/src/mindustry/content/Blocks.java +++ b/core/src/mindustry/content/Blocks.java @@ -2311,7 +2311,6 @@ public class Blocks{ requirements(Category.power, with(Items.copper, 2, Items.lead, 6)); maxNodes = 10; laserRange = 6; - buildCostMultiplier = 2.5f; }}; powerNodeLarge = new PowerNode("power-node-large"){{ diff --git a/core/src/mindustry/content/UnitTypes.java b/core/src/mindustry/content/UnitTypes.java index 113193b15a..3662857a13 100644 --- a/core/src/mindustry/content/UnitTypes.java +++ b/core/src/mindustry/content/UnitTypes.java @@ -1267,6 +1267,7 @@ public class UnitTypes{ engineOffset = 5.7f; range = 50f; isEnemy = false; + controlSelectGlobal = false; ammoType = new PowerAmmoType(500); diff --git a/core/src/mindustry/input/DesktopInput.java b/core/src/mindustry/input/DesktopInput.java index cdada0ed26..1a400df68f 100644 --- a/core/src/mindustry/input/DesktopInput.java +++ b/core/src/mindustry/input/DesktopInput.java @@ -306,10 +306,10 @@ public class DesktopInput extends InputHandler{ commandBuildings.clear(); if(input.keyDown(Binding.selectAcrossScreen)){ camera.bounds(Tmp.r1); - selectedUnits.set(selectedCommandUnits(Tmp.r1.x, Tmp.r1.y, Tmp.r1.width, Tmp.r1.height)); + selectedUnits.set(selectedCommandUnits(Tmp.r1.x, Tmp.r1.y, Tmp.r1.width, Tmp.r1.height).removeAll(u -> !u.type.controlSelectGlobal)); }else { for(var unit : player.team().data().units){ - if(unit.isCommandable()){ + if(unit.isCommandable() && unit.type.controlSelectGlobal){ selectedUnits.add(unit); } } @@ -325,7 +325,7 @@ public class DesktopInput extends InputHandler{ selectedUnits.set(selectedCommandUnits(Tmp.r1.x, Tmp.r1.y, Tmp.r1.width, Tmp.r1.height, u -> u instanceof Payloadc)); }else { for(var unit : player.team().data().units){ - if(unit.isCommandable() && unit instanceof Payloadc){ + if(unit.isCommandable() && unit instanceof Payloadc){ selectedUnits.add(unit); } } diff --git a/core/src/mindustry/type/UnitType.java b/core/src/mindustry/type/UnitType.java index 4a782b3002..edb903a331 100644 --- a/core/src/mindustry/type/UnitType.java +++ b/core/src/mindustry/type/UnitType.java @@ -178,6 +178,8 @@ public class UnitType extends UnlockableContent implements Senseable{ logicControllable = true, /** if false, players cannot control this unit */ playerControllable = true, + /** If true, the unit can be selected with the global selection hotkey (shift+g). */ + controlSelectGlobal = true, /** if false, this unit cannot be moved into payloads */ allowedInPayloads = true, /** if false, this unit cannot be hit by bullets or explosions*/ diff --git a/gradle.properties b/gradle.properties index 543e664edd..5e1d3a2b35 100644 --- a/gradle.properties +++ b/gradle.properties @@ -26,4 +26,4 @@ org.gradle.caching=true org.gradle.internal.http.socketTimeout=100000 org.gradle.internal.http.connectionTimeout=100000 android.enableR8.fullMode=false -archash=bd8d9520a4 +archash=ae3b50eaca