From 0593c66f70bd5ea38f7b855e5d1353c8b7c92b09 Mon Sep 17 00:00:00 2001 From: Anuken Date: Sun, 13 Feb 2022 20:36:28 -0500 Subject: [PATCH] Fixed assembler requirements --- core/src/mindustry/content/ErekirTechTree.java | 2 +- .../maps/planet/ErekirPlanetGenerator.java | 2 +- .../ui/fragments/PlacementFragment.java | 4 ++-- .../world/blocks/units/UnitAssembler.java | 2 ++ .../mindustry/world/modules/ConsumeModule.java | 16 ++++++++++++++-- 5 files changed, 20 insertions(+), 6 deletions(-) diff --git a/core/src/mindustry/content/ErekirTechTree.java b/core/src/mindustry/content/ErekirTechTree.java index 710fabe7ba..2a065d9564 100644 --- a/core/src/mindustry/content/ErekirTechTree.java +++ b/core/src/mindustry/content/ErekirTechTree.java @@ -217,7 +217,7 @@ public class ErekirTechTree{ }); }); - node(tankAssembler, Seq.with(new OnSector(four), new Research(constructor), new Research(slagCentrifuge), new Research(Liquids.gallium)), () -> { + node(tankAssembler, Seq.with(new OnSector(four), new Research(constructor), new Research(atmosphericConcentrator)), () -> { node(UnitTypes.vanquish, () -> { node(UnitTypes.conquer, Seq.with(tmpNever), () -> { diff --git a/core/src/mindustry/maps/planet/ErekirPlanetGenerator.java b/core/src/mindustry/maps/planet/ErekirPlanetGenerator.java index 6e22fb1b2f..76d188ac1f 100644 --- a/core/src/mindustry/maps/planet/ErekirPlanetGenerator.java +++ b/core/src/mindustry/maps/planet/ErekirPlanetGenerator.java @@ -179,7 +179,7 @@ public class ErekirPlanetGenerator extends PlanetGenerator{ //TODO: yellow regolith biome tweaks //TODO ice biome - float length = width/3f; + float length = width/2.6f; Vec2 trns = Tmp.v1.trns(rand.random(360f), length); int spawnX = (int)(trns.x + width/2f), spawnY = (int)(trns.y + height/2f), diff --git a/core/src/mindustry/ui/fragments/PlacementFragment.java b/core/src/mindustry/ui/fragments/PlacementFragment.java index 98ba3b4984..45eaee9633 100644 --- a/core/src/mindustry/ui/fragments/PlacementFragment.java +++ b/core/src/mindustry/ui/fragments/PlacementFragment.java @@ -88,14 +88,14 @@ public class PlacementFragment extends Fragment{ Events.run(Trigger.update, () -> { //disable flow updating on previous building so it doesn't waste CPU if(lastFlowBuild != null && lastFlowBuild != nextFlowBuild){ - if(lastFlowBuild.items != null) lastFlowBuild.flowItems().stopFlow(); + if(lastFlowBuild.flowItems() != null) lastFlowBuild.flowItems().stopFlow(); if(lastFlowBuild.liquids != null) lastFlowBuild.liquids.stopFlow(); } lastFlowBuild = nextFlowBuild; if(nextFlowBuild != null){ - if(nextFlowBuild.items != null) nextFlowBuild.flowItems().updateFlow(); + if(nextFlowBuild.flowItems() != null) nextFlowBuild.flowItems().updateFlow(); if(nextFlowBuild.liquids != null) nextFlowBuild.liquids.updateFlow(); } }); diff --git a/core/src/mindustry/world/blocks/units/UnitAssembler.java b/core/src/mindustry/world/blocks/units/UnitAssembler.java index 75a9657e77..f672110710 100644 --- a/core/src/mindustry/world/blocks/units/UnitAssembler.java +++ b/core/src/mindustry/world/blocks/units/UnitAssembler.java @@ -267,6 +267,8 @@ public class UnitAssembler extends PayloadBlock{ public void display(Table table){ super.display(table); + if(team != player.team()) return; + table.row(); table.table(t -> { t.left().defaults().left(); diff --git a/core/src/mindustry/world/modules/ConsumeModule.java b/core/src/mindustry/world/modules/ConsumeModule.java index 8105849bd6..f40c99cd4c 100644 --- a/core/src/mindustry/world/modules/ConsumeModule.java +++ b/core/src/mindustry/world/modules/ConsumeModule.java @@ -4,10 +4,10 @@ import arc.util.io.*; import mindustry.gen.*; import mindustry.world.meta.*; -/** @deprecated why is it a module? literally two booleans, why did I think it was a good idea? yay, more pointers??? +/** + * why is it a module? literally two booleans, why did I think it was a good idea? yay, more pointers??? * the braindead java "make everything a separate class" mentality * */ -@Deprecated public class ConsumeModule extends BlockModule{ private final Building build; @@ -15,26 +15,38 @@ public class ConsumeModule extends BlockModule{ this.build = build; } + /** @deprecated use build.status() */ + @Deprecated public BlockStatus status(){ return build.status(); } + /** @deprecated use build.updateConsumption() */ + @Deprecated public void update(){ build.updateConsumption(); } + /** @deprecated use build.consume() */ + @Deprecated public void trigger(){ build.consume(); } + /** @deprecated use build.consValid() */ + @Deprecated public boolean valid(){ return build.consValid(); } + /** @deprecated use build.canConsume() */ + @Deprecated public boolean canConsume(){ return build.canConsume(); } + /** @deprecated use build.consOptionalValid() */ + @Deprecated public boolean optionalValid(){ return build.consOptionalValid(); }