mirror of
https://github.com/Anuken/Mindustry.git
synced 2025-01-10 23:28:52 +07:00
Crash fixes / Mod browser >=136 filter
This commit is contained in:
parent
c4d5126ac2
commit
ebf9e82146
Binary file not shown.
@ -144,7 +144,7 @@ public class BlockIndexer{
|
||||
process(tile);
|
||||
|
||||
var drop = tile.drop();
|
||||
if(drop != null){
|
||||
if(drop != null && ores != null){
|
||||
int qx = tile.x / quadrantSize;
|
||||
int qy = tile.y / quadrantSize;
|
||||
|
||||
|
@ -168,18 +168,6 @@ public class Logic implements ApplicationListener{
|
||||
}
|
||||
});
|
||||
|
||||
//send out items to each client
|
||||
Events.on(TurnEvent.class, e -> {
|
||||
if(net.server() && state.isCampaign()){
|
||||
int[] out = new int[content.items().size];
|
||||
state.getSector().info.production.each((item, stat) -> {
|
||||
out[item.id] = Math.max(0, (int)(stat.mean * turnDuration / 60));
|
||||
});
|
||||
|
||||
Call.sectorProduced(out);
|
||||
}
|
||||
});
|
||||
|
||||
//listen to core changes; if all cores have been destroyed, set to derelict.
|
||||
Events.on(CoreChangeEvent.class, e -> Core.app.post(() -> {
|
||||
if(state.rules.cleanupDeadTeams && state.rules.pvp && !e.core.isAdded() && e.core.team != Team.derelict && e.core.team.cores().isEmpty()){
|
||||
@ -397,7 +385,9 @@ public class Logic implements ApplicationListener{
|
||||
//called when the remote server runs a turn and produces something
|
||||
@Remote
|
||||
public static void sectorProduced(int[] amounts){
|
||||
if(!state.isCampaign()) return;
|
||||
//TODO currently disabled.
|
||||
if(!state.isCampaign() || true) return;
|
||||
|
||||
Planet planet = state.rules.sector.planet;
|
||||
boolean any = false;
|
||||
|
||||
|
@ -658,7 +658,7 @@ public class MobileInput extends InputHandler implements GestureListener{
|
||||
payloadTarget = null;
|
||||
|
||||
//control a unit/block detected on first tap of double-tap
|
||||
if(unitTapped != null && state.rules.possessionAllowed){
|
||||
if(unitTapped != null && state.rules.possessionAllowed && unitTapped.isAI() && unitTapped.team == player.team() && !unitTapped.dead && unitTapped.type.playerControllable){
|
||||
Call.unitControl(player, unitTapped);
|
||||
recentRespawnTimer = 1f;
|
||||
}else if(buildingTapped != null && state.rules.possessionAllowed){
|
||||
|
@ -430,7 +430,7 @@ public class ModsDialog extends BaseDialog{
|
||||
if(((mod.hasJava || mod.hasScripts) && Vars.ios) ||
|
||||
(!Strings.matches(searchtxt, mod.name) && !Strings.matches(searchtxt, mod.repo))
|
||||
//hack, I'm basically testing if 135.10 >= modVersion, which is equivalent to modVersion >= 136
|
||||
//|| (Version.isAtLeast(135, 10, mod.minGameVersion))
|
||||
|| (Version.isAtLeast(135, 10, mod.minGameVersion))
|
||||
) continue;
|
||||
|
||||
float s = 64f;
|
||||
|
Loading…
Reference in New Issue
Block a user