Sector size increased / Cores moved / Fixed desktop recipes appearing
This commit is contained in:
@@ -4,8 +4,8 @@ import com.badlogic.gdx.graphics.Texture;
|
||||
import com.badlogic.gdx.utils.Array;
|
||||
import io.anuke.mindustry.game.Saves.SaveSlot;
|
||||
import io.anuke.mindustry.game.SpawnGroup;
|
||||
import io.anuke.mindustry.maps.goals.Mission;
|
||||
import io.anuke.mindustry.maps.goals.WaveMission;
|
||||
import io.anuke.mindustry.maps.missions.Mission;
|
||||
import io.anuke.mindustry.maps.missions.WaveMission;
|
||||
import io.anuke.mindustry.type.Item;
|
||||
import io.anuke.ucore.util.Bits;
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@ import io.anuke.mindustry.content.Items;
|
||||
import io.anuke.mindustry.core.GameState.State;
|
||||
import io.anuke.mindustry.game.Team;
|
||||
import io.anuke.mindustry.maps.generation.WorldGenerator.GenResult;
|
||||
import io.anuke.mindustry.maps.goals.BattleMission;
|
||||
import io.anuke.mindustry.maps.missions.BattleMission;
|
||||
import io.anuke.mindustry.world.ColorMapper;
|
||||
import io.anuke.mindustry.world.Edges;
|
||||
import io.anuke.ucore.core.Settings;
|
||||
|
||||
@@ -207,7 +207,7 @@ public class WorldGenerator{
|
||||
}
|
||||
}
|
||||
|
||||
int coreX = width/2, coreY = height/3;
|
||||
int coreX = 60, coreY = 60;
|
||||
|
||||
tiles[coreX][coreY].setBlock(StorageBlocks.core);
|
||||
tiles[coreX][coreY].setTeam(Team.blue);
|
||||
|
||||
@@ -1,26 +0,0 @@
|
||||
package io.anuke.mindustry.maps.goals;
|
||||
|
||||
import io.anuke.mindustry.Vars;
|
||||
import io.anuke.mindustry.content.blocks.StorageBlocks;
|
||||
import io.anuke.mindustry.game.Team;
|
||||
import io.anuke.mindustry.maps.Sector;
|
||||
import io.anuke.mindustry.world.Tile;
|
||||
import io.anuke.ucore.util.Mathf;
|
||||
|
||||
public class BattleMission implements Mission{
|
||||
|
||||
@Override
|
||||
public void generate(Tile[][] tiles, Sector sector){
|
||||
int x = Mathf.randomSeed(sector.getSeed(), 1, tiles.length - 2);
|
||||
int y = Mathf.randomSeed(sector.getSeed(), 1, tiles[0].length - 2);
|
||||
|
||||
tiles[x][y].setBlock(StorageBlocks.core);
|
||||
tiles[x][y].setTeam(Team.red);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isComplete(){
|
||||
//TODO check all enemy teams, not just the first
|
||||
return Vars.state.teams.getTeams(false).first().cores.size == 0;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
package io.anuke.mindustry.maps.missions;
|
||||
|
||||
import io.anuke.mindustry.Vars;
|
||||
import io.anuke.mindustry.content.blocks.StorageBlocks;
|
||||
import io.anuke.mindustry.game.Team;
|
||||
import io.anuke.mindustry.maps.Sector;
|
||||
import io.anuke.mindustry.world.Tile;
|
||||
|
||||
public class BattleMission implements Mission{
|
||||
|
||||
@Override
|
||||
public void generate(Tile[][] tiles, Sector sector){
|
||||
int cx = 0, cy = 0;
|
||||
outer:
|
||||
for(int x = 0; x < tiles.length; x++){
|
||||
for(int y = 0; y < tiles[0].length; y++){
|
||||
if(tiles[x][y].block() == StorageBlocks.core){
|
||||
//set enemy core position to mirrored player core position
|
||||
cx = tiles.length - 1 - x;
|
||||
cy = tiles[0].length - 1 - y;
|
||||
break outer;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
tiles[cx][cy].setBlock(StorageBlocks.core);
|
||||
tiles[cx][cy].setTeam(Team.red);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isComplete(){
|
||||
//TODO check all enemy teams, not just the first
|
||||
return Vars.state.teams.getTeams(false).first().cores.size == 0;
|
||||
}
|
||||
}
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
package io.anuke.mindustry.maps.goals;
|
||||
package io.anuke.mindustry.maps.missions;
|
||||
|
||||
import io.anuke.mindustry.maps.Sector;
|
||||
import io.anuke.mindustry.world.Tile;
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
package io.anuke.mindustry.maps.goals;
|
||||
package io.anuke.mindustry.maps.missions;
|
||||
|
||||
import static io.anuke.mindustry.Vars.*;
|
||||
|
||||
Reference in New Issue
Block a user