Sector size increased / Cores moved / Fixed desktop recipes appearing
This commit is contained in:
@@ -45,7 +45,7 @@ public class Vars{
|
||||
// public static final int saveSlots = 64;
|
||||
public static final float itemSize = 5f;
|
||||
public static final int tilesize = 8;
|
||||
public static final int sectorSize = 256;
|
||||
public static final int sectorSize = 300;
|
||||
public static final int mapPadding = 3;
|
||||
public static final int invalidSector = Integer.MAX_VALUE;
|
||||
public static Locale[] locales;
|
||||
|
||||
@@ -214,9 +214,7 @@ public abstract class Unit extends DestructibleEntity implements SaveTrait, Targ
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Updates velocity and status effects.
|
||||
*/
|
||||
/**Updates velocity and status effects.*/
|
||||
public void updateVelocityStatus(float drag, float maxVelocity){
|
||||
if(isCarried()){ //carried units do not take into account velocity normally
|
||||
set(carrier.getX(), carrier.getY());
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
35
core/src/io/anuke/mindustry/maps/missions/BattleMission.java
Normal file
35
core/src/io/anuke/mindustry/maps/missions/BattleMission.java
Normal file
@@ -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,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,4 +1,4 @@
|
||||
package io.anuke.mindustry.maps.goals;
|
||||
package io.anuke.mindustry.maps.missions;
|
||||
|
||||
import static io.anuke.mindustry.Vars.*;
|
||||
|
||||
@@ -113,7 +113,7 @@ public class Recipe implements UnlockableContent{
|
||||
|
||||
@Override
|
||||
public boolean isHidden(){
|
||||
return debugOnly;
|
||||
return debugOnly || (desktopOnly && mobile);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user