Biomass compressor fix / Crash fix / Removed spawners in waves
This commit is contained in:
@@ -3,6 +3,7 @@ package io.anuke.mindustry.content;
|
||||
import com.badlogic.gdx.utils.Array;
|
||||
import io.anuke.mindustry.content.blocks.*;
|
||||
import io.anuke.mindustry.game.Content;
|
||||
import io.anuke.mindustry.game.GameMode;
|
||||
import io.anuke.mindustry.type.ContentList;
|
||||
import io.anuke.mindustry.type.ItemStack;
|
||||
import io.anuke.mindustry.type.Recipe;
|
||||
@@ -131,15 +132,15 @@ public class Recipes implements ContentList{
|
||||
new Recipe(units, UnitBlocks.dronePad, new ItemStack(Items.tungsten, 70), new ItemStack(Items.lead, 110), new ItemStack(Items.silicon, 130));
|
||||
new Recipe(units, UnitBlocks.fabricatorPad, new ItemStack(Items.carbide, 90), new ItemStack(Items.thorium, 80), new ItemStack(Items.lead, 110), new ItemStack(Items.silicon, 210));
|
||||
|
||||
new Recipe(units, UnitBlocks.daggerPad, new ItemStack(Items.lead, 90), new ItemStack(Items.silicon, 80));
|
||||
new Recipe(units, UnitBlocks.titanPad, new ItemStack(Items.thorium, 90), new ItemStack(Items.lead, 140), new ItemStack(Items.silicon, 90));
|
||||
new Recipe(units, UnitBlocks.daggerPad, new ItemStack(Items.lead, 90), new ItemStack(Items.silicon, 80)).setMode(GameMode.noWaves);
|
||||
new Recipe(units, UnitBlocks.titanPad, new ItemStack(Items.thorium, 90), new ItemStack(Items.lead, 140), new ItemStack(Items.silicon, 90)).setMode(GameMode.noWaves);
|
||||
|
||||
new Recipe(units, UnitBlocks.interceptorPad, new ItemStack(Items.titanium, 60), new ItemStack(Items.lead, 80), new ItemStack(Items.silicon, 90));
|
||||
new Recipe(units, UnitBlocks.monsoonPad, new ItemStack(Items.plastanium, 80), new ItemStack(Items.titanium, 100), new ItemStack(Items.lead, 130), new ItemStack(Items.silicon, 220));
|
||||
new Recipe(units, UnitBlocks.interceptorPad, new ItemStack(Items.titanium, 60), new ItemStack(Items.lead, 80), new ItemStack(Items.silicon, 90)).setMode(GameMode.noWaves);
|
||||
new Recipe(units, UnitBlocks.monsoonPad, new ItemStack(Items.plastanium, 80), new ItemStack(Items.titanium, 100), new ItemStack(Items.lead, 130), new ItemStack(Items.silicon, 220)).setMode(GameMode.noWaves);
|
||||
|
||||
new Recipe(units, UnitBlocks.repairPoint, new ItemStack(Items.lead, 30), new ItemStack(Items.tungsten, 30), new ItemStack(Items.silicon, 30));
|
||||
new Recipe(units, UnitBlocks.resupplyPoint, new ItemStack(Items.lead, 30), new ItemStack(Items.tungsten, 30), new ItemStack(Items.silicon, 30));
|
||||
new Recipe(units, UnitBlocks.commandCenter, new ItemStack(Items.lead, 100), new ItemStack(Items.carbide, 100), new ItemStack(Items.silicon, 200));
|
||||
new Recipe(units, UnitBlocks.commandCenter, new ItemStack(Items.lead, 100), new ItemStack(Items.carbide, 100), new ItemStack(Items.silicon, 200)).setMode(GameMode.noWaves);
|
||||
|
||||
//LIQUIDS
|
||||
new Recipe(liquid, LiquidBlocks.conduit, new ItemStack(Items.lead, 1))
|
||||
|
||||
@@ -133,7 +133,7 @@ public abstract class BaseUnit extends Unit implements ShooterTrait{
|
||||
}
|
||||
|
||||
public boolean targetHasFlag(BlockFlag flag){
|
||||
return target instanceof TileEntity &&
|
||||
return target instanceof TileEntity && ((TileEntity) target).tile.block().flags != null &&
|
||||
((TileEntity) target).tile.block().flags.contains(flag);
|
||||
}
|
||||
|
||||
|
||||
@@ -19,7 +19,6 @@ public class WaveMission implements Mission{
|
||||
|
||||
@Override
|
||||
public Array<SpawnGroup> getWaves(Sector sector){
|
||||
Array<SpawnGroup> spawns = new Array<>();
|
||||
return Waves.getSpawns();
|
||||
}
|
||||
|
||||
|
||||
@@ -6,6 +6,7 @@ import com.badlogic.gdx.utils.ObjectMap;
|
||||
import com.badlogic.gdx.utils.OrderedMap;
|
||||
import io.anuke.mindustry.Vars;
|
||||
import io.anuke.mindustry.game.Content;
|
||||
import io.anuke.mindustry.game.GameMode;
|
||||
import io.anuke.mindustry.game.UnlockableContent;
|
||||
import io.anuke.mindustry.ui.ContentDisplay;
|
||||
import io.anuke.mindustry.world.Block;
|
||||
@@ -33,6 +34,7 @@ public class Recipe implements UnlockableContent{
|
||||
public final float cost;
|
||||
|
||||
public boolean desktopOnly = false, debugOnly = false;
|
||||
public GameMode targetMode;
|
||||
|
||||
private Block[] dependencies;
|
||||
private Recipe[] recipeDependencies;
|
||||
@@ -101,6 +103,11 @@ public class Recipe implements UnlockableContent{
|
||||
}
|
||||
}
|
||||
|
||||
public Recipe setMode(GameMode mode){
|
||||
this.targetMode = mode;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Recipe setDesktop(){
|
||||
desktopOnly = true;
|
||||
return this;
|
||||
|
||||
@@ -7,11 +7,13 @@ import com.badlogic.gdx.math.Interpolation;
|
||||
import com.badlogic.gdx.utils.Array;
|
||||
import io.anuke.mindustry.core.GameState.State;
|
||||
import io.anuke.mindustry.entities.TileEntity;
|
||||
import io.anuke.mindustry.game.EventType.WorldLoadEvent;
|
||||
import io.anuke.mindustry.input.InputHandler;
|
||||
import io.anuke.mindustry.type.Category;
|
||||
import io.anuke.mindustry.type.ItemStack;
|
||||
import io.anuke.mindustry.type.Recipe;
|
||||
import io.anuke.ucore.core.Core;
|
||||
import io.anuke.ucore.core.Events;
|
||||
import io.anuke.ucore.core.Graphics;
|
||||
import io.anuke.ucore.scene.Element;
|
||||
import io.anuke.ucore.scene.Group;
|
||||
@@ -87,6 +89,8 @@ public class BlocksFragment extends Fragment{
|
||||
}).bottom().right().get();
|
||||
});
|
||||
|
||||
Events.on(WorldLoadEvent.class, this::rebuild);
|
||||
|
||||
rebuild();
|
||||
}
|
||||
|
||||
@@ -165,7 +169,7 @@ public class BlocksFragment extends Fragment{
|
||||
|
||||
//add actual recipes
|
||||
for(Recipe r : recipes){
|
||||
if((r.debugOnly && !debug) || (r.desktopOnly && mobile)) continue;
|
||||
if((r.debugOnly && !debug) || (r.desktopOnly && mobile) || (r.targetMode != null && r.targetMode != state.mode)) continue;
|
||||
|
||||
ImageButton image = new ImageButton(new TextureRegion(), "select");
|
||||
|
||||
|
||||
@@ -158,7 +158,7 @@ public class Drill extends Block{
|
||||
}
|
||||
|
||||
for(Tile other : tile.getLinkedTiles(tempTiles)){
|
||||
if(isValid(other) && other.floor().dropsItem(entity.dominantItem)){
|
||||
if(isValid(other) && getDrop(other) == entity.dominantItem){
|
||||
entity.dominantItems ++;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user