diff --git a/core/assets-raw/sprites/blocks/units/prime-control-core.png b/core/assets-raw/sprites/blocks/units/prime-control-core.png new file mode 100644 index 0000000000..b1879a9ac7 Binary files /dev/null and b/core/assets-raw/sprites/blocks/units/prime-control-core.png differ diff --git a/core/assets/icons/icons.properties b/core/assets/icons/icons.properties index b8925b99ae..d885c1cc8e 100755 --- a/core/assets/icons/icons.properties +++ b/core/assets/icons/icons.properties @@ -539,3 +539,4 @@ 63164=world-cell|block-world-cell-ui 63163=carbide-wall|block-carbide-wall-ui 63162=carbide-wall-large|block-carbide-wall-large-ui +63161=prime-control-core|block-prime-control-core-ui diff --git a/core/assets/logicids.dat b/core/assets/logicids.dat index 8adb35898d..87e2db7395 100644 Binary files a/core/assets/logicids.dat and b/core/assets/logicids.dat differ diff --git a/core/src/mindustry/content/Blocks.java b/core/src/mindustry/content/Blocks.java index a463f2efb1..d2a17312bd 100644 --- a/core/src/mindustry/content/Blocks.java +++ b/core/src/mindustry/content/Blocks.java @@ -137,12 +137,12 @@ public class Blocks{ repairPoint, repairTurret, //unit - erekir - tankAssembler, - shipAssembler, - mechAssembler, + tankAssembler, shipAssembler, mechAssembler, //TODO maybe making it 5x5 would be more appropriate, seems kinda cheap. basicAssemblerModule, + primeControlCore, + //TODO remove droneCenter, //payloads @@ -2590,7 +2590,7 @@ public class Blocks{ }}; coreCitadel = new CoreBlock("core-citadel"){{ - requirements(Category.effect, with(Items.silicon, 7000, Items.beryllium, 7000, Items.tungsten, 4000, Items.oxide, 2000)); + requirements(Category.effect, with(Items.silicon, 7000, Items.beryllium, 7000, Items.tungsten, 4000, Items.oxide, 2500)); unitType = UnitTypes.incite; health = 18000; @@ -2600,7 +2600,8 @@ public class Blocks{ armor = 10f; unitCapModifier = 4; - researchCostMultiplier = 0.3f; + researchCostMultipliers.put(Items.silicon, 0.4f); + researchCostMultiplier = 0.14f; }}; coreAcropolis = new CoreBlock("core-acropolis"){{ @@ -2615,7 +2616,8 @@ public class Blocks{ armor = 15f; unitCapModifier = 6; - researchCostMultiplier = 0.3f; + researchCostMultipliers.put(Items.silicon, 0.3f); + researchCostMultiplier = 0.1f; }}; container = new StorageBlock("container"){{ @@ -3572,11 +3574,18 @@ public class Blocks{ //endregion //region units - erekir + primeControlCore = new ControlCore("prime-control-core"){{ + requirements(Category.units, with(Items.silicon, 120, Items.oxide, 30)); + size = 2; + placeablePlayer = false; + researchCostMultiplier = 0f; + }}; + tankAssembler = new UnitAssembler("tank-assembler"){{ requirements(Category.units, with(Items.graphite, 600, Items.beryllium, 600, Items.oxide, 250, Items.tungsten, 400, Items.silicon, 500)); size = 5; //TODO remove ducts and crushers, replace with 2-3 high cost special blocks with silicon requirements - plans.add(new AssemblerUnitPlan(UnitTypes.vanquish, 60f * 50f, BlockStack.list(Blocks.tungstenWallLarge, 12, Blocks.cliffCrusher, 12))); + plans.add(new AssemblerUnitPlan(UnitTypes.vanquish, 60f * 50f, BlockStack.list(Blocks.tungstenWallLarge, 12, Blocks.primeControlCore, 2))); consumes.power(3f); areaSize = 13; researchCostMultiplier = 0.4f; @@ -3588,7 +3597,7 @@ public class Blocks{ shipAssembler = new UnitAssembler("ship-assembler"){{ requirements(Category.units, with(Items.beryllium, 700, Items.oxide, 300, Items.tungsten, 500, Items.silicon, 800)); size = 5; - plans.add(new AssemblerUnitPlan(UnitTypes.quell, 60f * 60f, BlockStack.list(Blocks.berylliumWallLarge, 12, Blocks.plasmaBore, 8))); + plans.add(new AssemblerUnitPlan(UnitTypes.quell, 60f * 60f, BlockStack.list(Blocks.berylliumWallLarge, 12, Blocks.primeControlCore, 2))); consumes.power(3f); areaSize = 13; @@ -3599,7 +3608,8 @@ public class Blocks{ mechAssembler = new UnitAssembler("mech-assembler"){{ requirements(Category.units, with(Items.graphite, 500, Items.carbide, 600, Items.oxide, 200, Items.tungsten, 500, Items.silicon, 900)); size = 5; - plans.add(new AssemblerUnitPlan(UnitTypes.bulwark, 60f * 60f, BlockStack.list(Blocks.tungstenWallLarge, 5))); + //TODO different reqs + plans.add(new AssemblerUnitPlan(UnitTypes.bulwark, 60f * 60f, BlockStack.list(Blocks.tungstenWallLarge, 12, Blocks.primeControlCore, 2))); consumes.power(3f); areaSize = 13; @@ -3625,6 +3635,7 @@ public class Blocks{ droneType = UnitTypes.effectDrone; }}; + //endregion //region payloads @@ -3660,7 +3671,7 @@ public class Blocks{ reloadTime = 130f; chargeTime = 90f; //TODO 500 or 400? does it need to be better than the standard mass driver? - range = 400f; + range = 450f; maxPayloadSize = 2.5f; consumes.power(2f); }}; @@ -3699,7 +3710,7 @@ public class Blocks{ consumes.power(2f); size = 3; //TODO expand this list - filter = Seq.with(Blocks.tungstenWallLarge, Blocks.berylliumWallLarge, Blocks.reinforcedLiquidTank); + filter = Seq.with(Blocks.primeControlCore, Blocks.tungstenWallLarge, Blocks.berylliumWallLarge, Blocks.reinforcedLiquidContainer); }}; //yes this block is pretty much useless diff --git a/core/src/mindustry/content/ErekirTechTree.java b/core/src/mindustry/content/ErekirTechTree.java index c4b14a8a5f..4a1f0d4c43 100644 --- a/core/src/mindustry/content/ErekirTechTree.java +++ b/core/src/mindustry/content/ErekirTechTree.java @@ -220,6 +220,11 @@ public class ErekirTechTree{ }); node(tankAssembler, Seq.with(new OnSector(four), new Research(constructor), new Research(atmosphericConcentrator)), () -> { + //auto-unlock? + node(primeControlCore, () -> { + + }); + node(UnitTypes.vanquish, () -> { node(UnitTypes.conquer, Seq.with(tmpNever), () -> { diff --git a/core/src/mindustry/entities/effect/SeqEffect.java b/core/src/mindustry/entities/effect/SeqEffect.java index 0ac1179cac..4d2398e0ad 100644 --- a/core/src/mindustry/entities/effect/SeqEffect.java +++ b/core/src/mindustry/entities/effect/SeqEffect.java @@ -5,6 +5,7 @@ import mindustry.entities.*; /** * Renders multiple particle effects in sequence. * Will not work correctly for effects that modify life dynamically. + * Z layer of child effects is ignored. * */ public class SeqEffect extends Effect{ public Effect[] effects = {}; diff --git a/core/src/mindustry/world/Block.java b/core/src/mindustry/world/Block.java index 3b0ea6b32d..b0a07abca6 100644 --- a/core/src/mindustry/world/Block.java +++ b/core/src/mindustry/world/Block.java @@ -282,6 +282,8 @@ public class Block extends UnlockableContent implements Senseable{ public Effect destroyEffect = Fx.dynamicExplosion; /** Multiplier for cost of research in tech tree. */ public float researchCostMultiplier = 1; + /** Cost multipliers per-item. */ + public ObjectFloatMap researchCostMultipliers = new ObjectFloatMap<>(); /** Whether this block has instant transfer.*/ public boolean instantTransfer = false; /** Whether you can rotate this block after it is placed. */ @@ -887,9 +889,10 @@ public class Block extends UnlockableContent implements Senseable{ @Override public ItemStack[] researchRequirements(){ + if(researchCostMultiplier <= 0f) return ItemStack.empty; ItemStack[] out = new ItemStack[requirements.length]; for(int i = 0; i < out.length; i++){ - int quantity = 60 + Mathf.round(Mathf.pow(requirements[i].amount, 1.11f) * 20 * researchCostMultiplier, 10); + int quantity = 60 + Mathf.round(Mathf.pow(requirements[i].amount, 1.11f) * 20 * researchCostMultiplier * researchCostMultipliers.get(requirements[i].item, 1f), 10); out[i] = new ItemStack(requirements[i].item, UI.roundAmount(quantity)); } diff --git a/core/src/mindustry/world/blocks/units/ControlCore.java b/core/src/mindustry/world/blocks/units/ControlCore.java new file mode 100644 index 0000000000..8f349c7e6f --- /dev/null +++ b/core/src/mindustry/world/blocks/units/ControlCore.java @@ -0,0 +1,10 @@ +package mindustry.world.blocks.units; + +import mindustry.world.*; + +public class ControlCore extends Block{ + + public ControlCore(String name){ + super(name); + } +}