All known crashes fixed
This commit is contained in:
@@ -26,7 +26,7 @@ allprojects {
|
||||
appName = 'Mindustry'
|
||||
gdxVersion = '1.9.8'
|
||||
roboVMVersion = '2.3.0'
|
||||
uCoreVersion = '6a727b957e'
|
||||
uCoreVersion = '9969ed07b1'
|
||||
|
||||
getVersionString = {
|
||||
String buildVersion = getBuildVersion()
|
||||
|
||||
@@ -198,6 +198,7 @@ text.builtin=Built-In
|
||||
text.map.delete.confirm=Are you sure you want to delete this map? This action cannot be undone!
|
||||
text.map.random=[accent]Random Map
|
||||
text.map.nospawn=This map does not have any cores for the player to spawn in! Add a [ROYAL]blue[] core to this map in the editor.
|
||||
text.map.invalid=Error loading map: corrupted or invalid map file.
|
||||
text.editor.brush=Brush
|
||||
text.editor.slope=\\
|
||||
text.editor.openin=Open In Editor
|
||||
|
||||
@@ -256,7 +256,18 @@ public class World extends Module{
|
||||
|
||||
EntityPhysics.resizeTree(0, 0, width * tilesize, height * tilesize);
|
||||
|
||||
try{
|
||||
generator.loadTileData(tiles, MapIO.readTileData(map, true), map.meta.hasOreGen(), 0);
|
||||
} catch(Exception e){
|
||||
Log.err(e);
|
||||
if(!headless){
|
||||
ui.showError("$text.map.invalid");
|
||||
threads.runDelay(() -> state.set(State.menu));
|
||||
invalidMap = true;
|
||||
}
|
||||
generating = false;
|
||||
return;
|
||||
}
|
||||
|
||||
if(!headless && state.teams.get(players[0].getTeam()).cores.size == 0){
|
||||
ui.showError("$text.map.nospawn");
|
||||
|
||||
@@ -83,6 +83,7 @@ public abstract class InputHandler extends InputAdapter{
|
||||
int sent = Mathf.clamp(accepted / 4, 1, 8);
|
||||
int removed = accepted / sent;
|
||||
int[] remaining = {accepted, accepted};
|
||||
Block block = tile.block();
|
||||
|
||||
for(int i = 0; i < sent; i++){
|
||||
boolean end = i == sent - 1;
|
||||
@@ -92,6 +93,7 @@ public abstract class InputHandler extends InputAdapter{
|
||||
ItemTransfer.create(stack.item,
|
||||
player.x + Angles.trnsx(player.rotation + 180f, backTrns), player.y + Angles.trnsy(player.rotation + 180f, backTrns),
|
||||
new Translator(tile.drawx() + stackTrns.x, tile.drawy() + stackTrns.y), () -> {
|
||||
if(tile.block() != block) return;
|
||||
|
||||
tile.block().handleStack(stack.item, removed, tile, player);
|
||||
remaining[1] -= removed;
|
||||
|
||||
@@ -34,6 +34,7 @@ public class Recipe implements UnlockableContent{
|
||||
public final float cost;
|
||||
|
||||
public boolean desktopOnly = false, debugOnly = false;
|
||||
//the only gamemode in which the recipe shows up
|
||||
public GameMode targetMode;
|
||||
|
||||
private Block[] dependencies;
|
||||
|
||||
@@ -77,6 +77,12 @@ public class Conveyor extends Block{
|
||||
|
||||
@Override
|
||||
public void drawShadow(Tile tile){
|
||||
//fixes build block crash
|
||||
if(!(tile.entity instanceof ConveyorEntity)){
|
||||
super.drawShadow(tile);
|
||||
return;
|
||||
}
|
||||
|
||||
ConveyorEntity entity = tile.entity();
|
||||
|
||||
if(entity.blendshadowrot == -1){
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package io.anuke.mindustry.world.blocks.storage;
|
||||
|
||||
import com.badlogic.gdx.utils.Array;
|
||||
import io.anuke.mindustry.content.Items;
|
||||
import io.anuke.mindustry.entities.TileEntity;
|
||||
import io.anuke.mindustry.type.Item;
|
||||
import io.anuke.mindustry.world.Edges;
|
||||
@@ -54,7 +55,7 @@ public class Vault extends StorageBlock{
|
||||
|
||||
if(other == null || !(other.block() instanceof StorageBlock)) continue;
|
||||
|
||||
if(other.block() instanceof Vault){
|
||||
if(!(other.block() instanceof Vault)){
|
||||
|
||||
for(int ii = 0; ii < Item.all().size; ii++){
|
||||
Item item = Item.getByID(ii);
|
||||
@@ -67,10 +68,10 @@ public class Vault extends StorageBlock{
|
||||
}
|
||||
}
|
||||
}else{
|
||||
todump = Items.tungsten;
|
||||
|
||||
if(other.block().acceptItem(todump, other, in) && canDump(tile, other, todump)){
|
||||
other.block().handleItem(todump, other, in);
|
||||
tile.entity.items.remove(todump, 1);
|
||||
other.block().handleItem(removeItem(tile, null), other, in);
|
||||
incrementDump(tile, proximity.size);
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -10,6 +10,7 @@ import io.anuke.mindustry.entities.Player;
|
||||
import io.anuke.mindustry.entities.TileEntity;
|
||||
import io.anuke.mindustry.entities.units.BaseUnit;
|
||||
import io.anuke.mindustry.entities.units.UnitCommand;
|
||||
import io.anuke.mindustry.game.Team;
|
||||
import io.anuke.mindustry.gen.Call;
|
||||
import io.anuke.mindustry.graphics.Palette;
|
||||
import io.anuke.mindustry.world.Block;
|
||||
@@ -98,7 +99,9 @@ public class CommandCenter extends Block{
|
||||
}
|
||||
}
|
||||
|
||||
for(BaseUnit unit : unitGroups[player.getTeam().ordinal()].all()){
|
||||
Team team = (player == null ? tile.getTeam() : player.getTeam());
|
||||
|
||||
for(BaseUnit unit : unitGroups[team.ordinal()].all()){
|
||||
unit.onCommand(command);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -45,7 +45,7 @@ public class MechFactory extends Block{
|
||||
|
||||
@Remote(targets = Loc.both, called = Loc.server)
|
||||
public static void onMechFactoryTap(Player player, Tile tile){
|
||||
if(!checkValidTap(tile, player)) return;
|
||||
if(player == null || !checkValidTap(tile, player)) return;
|
||||
|
||||
MechFactoryEntity entity = tile.entity();
|
||||
player.beginRespawning(entity);
|
||||
|
||||
Reference in New Issue
Block a user