Fixed ores not spawning in certain maps
This commit is contained in:
Binary file not shown.
Binary file not shown.
@@ -120,6 +120,7 @@ public class MapGenerator extends Generator{
|
|||||||
|
|
||||||
if(distortFloor){
|
if(distortFloor){
|
||||||
tile.setFloor(tiles[newX][newY].floor());
|
tile.setFloor(tiles[newX][newY].floor());
|
||||||
|
tile.setOre(tiles[newX][newY].ore());
|
||||||
}
|
}
|
||||||
|
|
||||||
for(Decoration decor : decorations){
|
for(Decoration decor : decorations){
|
||||||
|
|||||||
@@ -269,6 +269,7 @@ public class Block extends BlockStorage{
|
|||||||
|
|
||||||
public float sumAttribute(Attribute attr, int x, int y){
|
public float sumAttribute(Attribute attr, int x, int y){
|
||||||
Tile tile = world.tile(x, y);
|
Tile tile = world.tile(x, y);
|
||||||
|
if(tile == null) return 0;
|
||||||
float sum = 0;
|
float sum = 0;
|
||||||
for(Tile other : tile.getLinkedTilesAs(this, tempTiles)){
|
for(Tile other : tile.getLinkedTilesAs(this, tempTiles)){
|
||||||
sum += other.floor().attributes.get(attr);
|
sum += other.floor().attributes.get(attr);
|
||||||
|
|||||||
@@ -7,6 +7,7 @@ import io.anuke.arc.graphics.g2d.TextureRegion;
|
|||||||
import io.anuke.arc.math.Mathf;
|
import io.anuke.arc.math.Mathf;
|
||||||
import io.anuke.arc.math.geom.Geometry;
|
import io.anuke.arc.math.geom.Geometry;
|
||||||
import io.anuke.arc.math.geom.Point2;
|
import io.anuke.arc.math.geom.Point2;
|
||||||
|
import io.anuke.arc.util.Log;
|
||||||
import io.anuke.mindustry.content.Blocks;
|
import io.anuke.mindustry.content.Blocks;
|
||||||
import io.anuke.mindustry.content.Fx;
|
import io.anuke.mindustry.content.Fx;
|
||||||
import io.anuke.mindustry.content.StatusEffects;
|
import io.anuke.mindustry.content.StatusEffects;
|
||||||
|
|||||||
Reference in New Issue
Block a user