v2.2.0: further improved clarity of gold in stitched wall tiles

This commit is contained in:
Evan Debenham
2023-08-01 14:02:52 -04:00
parent 0b754e9626
commit 8f741edbc9
4 changed files with 30 additions and 10 deletions
Binary file not shown.

Before

Width:  |  Height:  |  Size: 18 KiB

After

Width:  |  Height:  |  Size: 18 KiB

@@ -42,6 +42,7 @@ import com.shatteredpixel.shatteredpixeldungeon.levels.traps.StormTrap;
import com.shatteredpixel.shatteredpixeldungeon.levels.traps.SummoningTrap; import com.shatteredpixel.shatteredpixeldungeon.levels.traps.SummoningTrap;
import com.shatteredpixel.shatteredpixeldungeon.levels.traps.WarpingTrap; import com.shatteredpixel.shatteredpixeldungeon.levels.traps.WarpingTrap;
import com.shatteredpixel.shatteredpixeldungeon.messages.Messages; import com.shatteredpixel.shatteredpixeldungeon.messages.Messages;
import com.shatteredpixel.shatteredpixeldungeon.tiles.DungeonTileSheet;
import com.shatteredpixel.shatteredpixeldungeon.tiles.DungeonTilemap; import com.shatteredpixel.shatteredpixeldungeon.tiles.DungeonTilemap;
import com.watabou.noosa.Game; import com.watabou.noosa.Game;
import com.watabou.noosa.Group; import com.watabou.noosa.Group;
@@ -160,9 +161,13 @@ public class CavesLevel extends RegularLevel {
} }
public static void addCavesVisuals( Level level, Group group ) { public static void addCavesVisuals( Level level, Group group ) {
addCavesVisuals(level, group, false);
}
public static void addCavesVisuals( Level level, Group group, boolean overHang ) {
for (int i=0; i < level.length(); i++) { for (int i=0; i < level.length(); i++) {
if (level.map[i] == Terrain.WALL_DECO) { if (level.map[i] == Terrain.WALL_DECO) {
group.add( new Vein( i ) ); group.add( new Vein( i, overHang ) );
} }
} }
} }
@@ -171,12 +176,19 @@ public class CavesLevel extends RegularLevel {
private int pos; private int pos;
private boolean includeOverhang;
private float delay; private float delay;
public Vein( int pos ) { public Vein( int pos ) {
this(pos, false);
}
public Vein( int pos, boolean includeOverhang ) {
super(); super();
this.pos = pos; this.pos = pos;
this.includeOverhang = includeOverhang;
delay = Random.Float( 2 ); delay = Random.Float( 2 );
} }
@@ -199,9 +211,18 @@ public class CavesLevel extends RegularLevel {
delay = Random.Float(); delay = Random.Float();
PointF p = DungeonTilemap.tileToWorld( pos ); PointF p = DungeonTilemap.tileToWorld( pos );
((Sparkle)recycle( Sparkle.class )).reset( if (includeOverhang && !DungeonTileSheet.wallStitcheable(Dungeon.level.map[pos-Dungeon.level.width()])){
p.x + Random.Float( DungeonTilemap.SIZE ), //also sparkles in the bottom 1/2 of the upper tile. Increases particle frequency by 50% accordingly.
p.y + Random.Float( DungeonTilemap.SIZE ) ); delay *= 0.67f;
p.y -= DungeonTilemap.SIZE/2f;
((Sparkle)recycle( Sparkle.class )).reset(
p.x + Random.Float( DungeonTilemap.SIZE ),
p.y + Random.Float( DungeonTilemap.SIZE*1.5f ) );
} else {
((Sparkle)recycle( Sparkle.class )).reset(
p.x + Random.Float( DungeonTilemap.SIZE ),
p.y + Random.Float( DungeonTilemap.SIZE ) );
}
} }
} }
} }
@@ -130,7 +130,7 @@ public class MiningLevel extends CavesLevel {
@Override @Override
public Group addWallVisuals() { public Group addWallVisuals() {
super.addWallVisuals(); super.addWallVisuals();
CavesLevel.addCavesVisuals(this, wallVisuals); CavesLevel.addCavesVisuals(this, wallVisuals, true);
return wallVisuals; return wallVisuals;
} }
@@ -303,8 +303,7 @@ public class DungeonTileSheet {
if (tile == Terrain.BOOKSHELF || below == Terrain.BOOKSHELF) result = WALL_INTERNAL_WOODEN; if (tile == Terrain.BOOKSHELF || below == Terrain.BOOKSHELF) result = WALL_INTERNAL_WOODEN;
//TODO currently this line on triggers on mining floors, do we want to make it universal? //TODO currently this line on triggers on mining floors, do we want to make it universal?
else if (Dungeon.branch == 1 && else if (Dungeon.branch == 1 && tile == Terrain.WALL_DECO) result = WALL_INTERNAL_DECO;
(tile == Terrain.WALL_DECO || below == Terrain.WALL_DECO)) result = WALL_INTERNAL_DECO;
else result = WALL_INTERNAL; else result = WALL_INTERNAL;
if (!wallStitcheable(right)) result += 1; if (!wallStitcheable(right)) result += 1;