diff --git a/core/assets/maps/mycelialBastion.msav b/core/assets/maps/mycelialBastion.msav index 694ae57492..13b6d80e6f 100644 Binary files a/core/assets/maps/mycelialBastion.msav and b/core/assets/maps/mycelialBastion.msav differ diff --git a/core/src/mindustry/type/Sector.java b/core/src/mindustry/type/Sector.java index 304a73452a..c7573b3c3a 100644 --- a/core/src/mindustry/type/Sector.java +++ b/core/src/mindustry/type/Sector.java @@ -163,7 +163,7 @@ public class Sector{ } public boolean isCaptured(){ - if(isBeingPlayed()) return !info.waves && !info.attack; + if(isBeingPlayed()) return !state.rules.waves && !state.rules.attackMode; return save != null && !info.waves && !info.attack; } diff --git a/core/src/mindustry/world/modules/ItemModule.java b/core/src/mindustry/world/modules/ItemModule.java index 04c9a878c2..5f01d335e3 100644 --- a/core/src/mindustry/world/modules/ItemModule.java +++ b/core/src/mindustry/world/modules/ItemModule.java @@ -179,8 +179,7 @@ public class ItemModule extends BlockModule{ return total > 0; } - @Nullable - public Item first(){ + public @Nullable Item first(){ for(int i = 0; i < items.length; i++){ if(items[i] > 0){ return content.item(i); @@ -189,8 +188,7 @@ public class ItemModule extends BlockModule{ return null; } - @Nullable - public Item take(){ + public @Nullable Item take(){ for(int i = 0; i < items.length; i++){ int index = (i + takeRotation); if(index >= items.length) index -= items.length; @@ -204,30 +202,6 @@ public class ItemModule extends BlockModule{ return null; } - /** Begins a speculative take operation. This returns the item that would be returned by #take(), but does not change state. */ - @Nullable - public Item takeIndex(int takeRotation){ - for(int i = 0; i < items.length; i++){ - int index = (i + takeRotation); - if(index >= items.length) index -= items.length; - if(items[index] > 0){ - return content.item(index); - } - } - return null; - } - - public int nextIndex(int takeRotation){ - for(int i = 1; i < items.length; i++){ - int index = (i + takeRotation); - if(index >= items.length) index -= items.length; - if(items[index] > 0){ - return (takeRotation + i) % items.length; - } - } - return takeRotation; - } - public int get(int id){ return items[id]; }