mirror of
https://github.com/Anuken/Mindustry.git
synced 2025-03-13 11:29:48 +07:00
Removed sandbox from shuffle list / duplicate maps / mobile mech pickup
This commit is contained in:
parent
3b58d57e5c
commit
dd2c71fe61
@ -60,7 +60,7 @@ public class Player extends Unit implements BuilderTrait, CarryTrait, ShooterTra
|
||||
public boolean achievedFlight;
|
||||
public Color color = new Color();
|
||||
public Mech mech;
|
||||
public int spawner;
|
||||
public int spawner = -1;
|
||||
|
||||
public NetConnection con;
|
||||
public int playerIndex = 0;
|
||||
@ -482,6 +482,10 @@ public class Player extends Unit implements BuilderTrait, CarryTrait, ShooterTra
|
||||
setDead(true);
|
||||
}
|
||||
|
||||
if(netServer.isWaitingForPlayers()){
|
||||
setDead(true);
|
||||
}
|
||||
|
||||
if(isDead()){
|
||||
isBoosting = false;
|
||||
boostHeat = 0f;
|
||||
@ -778,7 +782,7 @@ public class Player extends Unit implements BuilderTrait, CarryTrait, ShooterTra
|
||||
((SpawnerTrait) world.tile(spawner).entity).updateSpawning(this);
|
||||
}else{
|
||||
CoreEntity entity = (CoreEntity) getClosestCore();
|
||||
if(entity != null){
|
||||
if(entity != null && !netServer.isWaitingForPlayers()){
|
||||
this.spawner = entity.tile.id();
|
||||
}
|
||||
}
|
||||
@ -859,7 +863,7 @@ public class Player extends Unit implements BuilderTrait, CarryTrait, ShooterTra
|
||||
color.set(buffer.readInt());
|
||||
mech = content.getByID(ContentType.mech, buffer.readByte());
|
||||
int mine = buffer.readInt();
|
||||
spawner = buffer.readInt();
|
||||
int spawner = buffer.readInt();
|
||||
float baseRotation = buffer.readShort() / 2f;
|
||||
|
||||
readBuilding(buffer, !isLocal);
|
||||
@ -873,6 +877,7 @@ public class Player extends Unit implements BuilderTrait, CarryTrait, ShooterTra
|
||||
}else{
|
||||
mining = world.tile(mine);
|
||||
isBoosting = boosting;
|
||||
this.spawner = spawner;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -567,7 +567,7 @@ public class MobileInput extends InputHandler implements GestureListener{
|
||||
//add to selection queue if it's a valid BREAK position
|
||||
cursor = cursor.target();
|
||||
selection.add(new PlaceRequest(cursor.worldx(), cursor.worldy()));
|
||||
}else if(!canTapPlayer(worldx, worldy)){
|
||||
}else if(!canTapPlayer(worldx, worldy) && player.mech.flying){
|
||||
boolean consumed = false;
|
||||
//else, try and carry units
|
||||
if(player.getCarry() != null){
|
||||
|
@ -57,7 +57,7 @@ public class Maps implements Disposable{
|
||||
|
||||
/**Returns map by internal name.*/
|
||||
public Map getByName(String name){
|
||||
return maps.get(name);
|
||||
return maps.get(name.toLowerCase());
|
||||
}
|
||||
|
||||
/**Load all maps. Should be called at application start.*/
|
||||
@ -81,6 +81,7 @@ public class Maps implements Disposable{
|
||||
ObjectMap<String, String> newTags = new ObjectMap<>();
|
||||
newTags.putAll(tags);
|
||||
tags = newTags;
|
||||
|
||||
if (!gwt) {
|
||||
FileHandle file = customMapDirectory.child(name + "." + mapExtension);
|
||||
MapIO.writeMap(file.write(false), tags, data);
|
||||
@ -144,7 +145,7 @@ public class Maps implements Disposable{
|
||||
map.texture = new Texture(MapIO.generatePixmap(MapIO.readTileData(ds, meta, true)));
|
||||
}
|
||||
|
||||
maps.put(map.name, map);
|
||||
maps.put(map.name.toLowerCase(), map);
|
||||
allMaps.add(map);
|
||||
}
|
||||
}
|
||||
|
@ -112,7 +112,7 @@ public class ServerControl extends Module{
|
||||
if(Settings.getBool("shuffle")){
|
||||
if(world.getSector() == null){
|
||||
if(world.maps.all().size > 0){
|
||||
Array<Map> maps = world.maps.all();
|
||||
Array<Map> maps = world.maps.customMaps().size == 0 ? world.maps.defaultMaps() : world.maps.customMaps();
|
||||
|
||||
Map previous = world.getMap();
|
||||
Map map = previous;
|
||||
|
Loading…
Reference in New Issue
Block a user