v2.2.0: re-added grass in terrain features (forgot about custom visuals)

This commit is contained in:
Evan Debenham
2023-08-04 12:40:54 -04:00
parent c48b372bfc
commit 054ffbc21b
2 changed files with 14 additions and 0 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

After

Width:  |  Height:  |  Size: 15 KiB

View File

@@ -23,6 +23,8 @@ package com.shatteredpixel.shatteredpixeldungeon.tiles;
import com.shatteredpixel.shatteredpixeldungeon.Assets;
import com.shatteredpixel.shatteredpixeldungeon.Dungeon;
import com.shatteredpixel.shatteredpixeldungeon.levels.LastShopLevel;
import com.shatteredpixel.shatteredpixeldungeon.levels.Terrain;
import com.shatteredpixel.shatteredpixeldungeon.levels.traps.Trap;
import com.shatteredpixel.shatteredpixeldungeon.plants.Plant;
import com.watabou.noosa.Image;
@@ -62,6 +64,18 @@ public class TerrainFeaturesTilemap extends DungeonTilemap {
return plants.get(pos).image + 7*16;
}
int stage = (Dungeon.depth-1)/5;
if (Dungeon.depth == 21 && Dungeon.level instanceof LastShopLevel) stage--;
if (tile == Terrain.HIGH_GRASS){
return 9 + 16*stage + (DungeonTileSheet.tileVariance[pos] >= 50 ? 1 : 0);
} else if (tile == Terrain.FURROWED_GRASS){
return 11 + 16*stage + (DungeonTileSheet.tileVariance[pos] >= 50 ? 1 : 0);
} else if (tile == Terrain.GRASS) {
return 13 + 16*stage + (DungeonTileSheet.tileVariance[pos] >= 50 ? 1 : 0);
} else if (tile == Terrain.EMBERS) {
return 9 * (16*5) + (DungeonTileSheet.tileVariance[pos] >= 50 ? 1 : 0);
}
return -1;
}