diff --git a/core/assets-raw/sprites/blocks/turrets/ripple.png b/core/assets-raw/sprites/blocks/turrets/ripple.png index 92bd3db328..4660117fd8 100644 Binary files a/core/assets-raw/sprites/blocks/turrets/ripple.png and b/core/assets-raw/sprites/blocks/turrets/ripple.png differ diff --git a/core/src/mindustry/core/ContentLoader.java b/core/src/mindustry/core/ContentLoader.java index 0fabcc5ce8..de2fe755df 100644 --- a/core/src/mindustry/core/ContentLoader.java +++ b/core/src/mindustry/core/ContentLoader.java @@ -33,7 +33,7 @@ public class ContentLoader{ public ContentLoader(){ for(ContentType type : ContentType.all){ - contentMap[type.ordinal()] = new Seq<>(); + contentMap[type.ordinal()] = new Seq<>(type.contentClass == null ? Object.class : type.contentClass); contentNameMap[type.ordinal()] = new ObjectMap<>(); } } diff --git a/core/src/mindustry/entities/comp/BuildingComp.java b/core/src/mindustry/entities/comp/BuildingComp.java index a1c5f7b766..21614e4e5b 100644 --- a/core/src/mindustry/entities/comp/BuildingComp.java +++ b/core/src/mindustry/entities/comp/BuildingComp.java @@ -1006,15 +1006,20 @@ abstract class BuildingComp implements Posc, Teamc, Healthc, Buildingc, Timerc, if(proximity.size == 0) return false; + var allItems = content.items(); + int itemSize = allItems.size; + Item[] itemArray = allItems.items; + for(int i = 0; i < proximity.size; i++){ Building other = proximity.get((i + dump) % proximity.size); if(todump == null){ - for(int ii = 0; ii < content.items().size; ii++){ - Item item = content.item(ii); + for(int ii = 0; ii < itemSize; ii++){ + if(!items.has(ii)) continue; + Item item = itemArray[ii]; - if(other.team == team && items.has(item) && other.acceptItem(self(), item) && canDump(other, item)){ + if(other.acceptItem(self(), item) && canDump(other, item)){ other.handleItem(self(), item); items.remove(item, 1); incrementDump(proximity.size); @@ -1022,7 +1027,7 @@ abstract class BuildingComp implements Posc, Teamc, Healthc, Buildingc, Timerc, } } }else{ - if(other.team == team && other.acceptItem(self(), todump) && canDump(other, todump)){ + if(other.acceptItem(self(), todump) && canDump(other, todump)){ other.handleItem(self(), todump); items.remove(todump, 1); incrementDump(proximity.size);