v2.5.0: improved landmark contents, brightened distant wells a bit
This commit is contained in:
Binary file not shown.
|
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 1.2 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 16 KiB After Width: | Height: | Size: 16 KiB |
@@ -163,14 +163,16 @@ journal.document.halls_king.thing.body=There's a problem. Thymor was dispatched
|
||||
journal.document.halls_king.attrition.title=Attrition
|
||||
journal.document.halls_king.attrition.body=I have a plan for dealing with the thing. Its power is infinite, but its ability to encroach on this world is not. It's relying on minions and avatars to do its bidding while it tries to build enough power to take the amulet.\n\nWhile I don't possess the amulet physically I still have full control over its power. With the entire dwarven city at my disposal I also have a numbers advantage. I can simply keep sending soldiers to prevent it from seizing the amulet and steadily win this war through attrition!\n\nI, RODNEY, KING OF DWARVES, WILL OUTLAST YOU YOG-DZEWA!
|
||||
|
||||
journal.notes$landmark.well_of_health=well of health
|
||||
journal.notes$landmark.well_of_awareness=well of awareness
|
||||
journal.notes$landmark.shop=shop
|
||||
journal.notes$landmark.alchemy=alchemy pot
|
||||
journal.notes$landmark.garden=garden
|
||||
journal.notes$landmark.statue=animated statue
|
||||
journal.notes$landmark.distant_well=distant well
|
||||
journal.notes$landmark.well_of_health=well of health
|
||||
journal.notes$landmark.well_of_awareness=well of awareness
|
||||
journal.notes$landmark.sacrificial_fire=sacrificial fire
|
||||
journal.notes$landmark.shop=shop
|
||||
journal.notes$landmark.statue=animated statue
|
||||
journal.notes$landmark.ghost=sad ghost
|
||||
journal.notes$landmark.rat_king=rat king
|
||||
journal.notes$landmark.wandmaker=old wandmaker
|
||||
journal.notes$landmark.troll=troll blacksmith
|
||||
journal.notes$landmark.imp=ambitious imp
|
||||
|
||||
@@ -231,13 +231,13 @@ levels.level.statue_desc=Someone wanted to adorn this place, but failed, obvious
|
||||
levels.level.alchemy_desc=This pot is filled with magical water. Items can be mixed into the pot to create something new!
|
||||
levels.level.empty_well_desc=The well has run dry.
|
||||
|
||||
levels.level$feeling.chasm_title=Chasm Floor
|
||||
levels.level$feeling.water_title=Water Floor
|
||||
levels.level$feeling.grass_title=Grass Floor
|
||||
levels.level$feeling.dark_title=Dark Floor
|
||||
levels.level$feeling.large_title=Large Floor
|
||||
levels.level$feeling.traps_title=Traps Floor
|
||||
levels.level$feeling.secrets_title=Secrets Floor
|
||||
levels.level$feeling.chasm_title=chasm floor
|
||||
levels.level$feeling.water_title=water floor
|
||||
levels.level$feeling.grass_title=grass floor
|
||||
levels.level$feeling.dark_title=dark floor
|
||||
levels.level$feeling.large_title=large floor
|
||||
levels.level$feeling.traps_title=traps floor
|
||||
levels.level$feeling.secrets_title=secrets floor
|
||||
levels.level$feeling.chasm_desc=Your steps echo across the dungeon.
|
||||
levels.level$feeling.water_desc=You hear water splashing around you.
|
||||
levels.level$feeling.grass_desc=The smell of vegetation is thick in the air.
|
||||
|
||||
@@ -27,6 +27,7 @@ import com.shatteredpixel.shatteredpixeldungeon.actors.Char;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Buff;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.abilities.Ratmogrify;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.KingsCrown;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.journal.Notes;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.messages.Messages;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.scenes.GameScene;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.sprites.RatKingSprite;
|
||||
@@ -100,6 +101,10 @@ public class RatKing extends NPC {
|
||||
} else {
|
||||
target = Dungeon.level.entrance();
|
||||
}
|
||||
} else {
|
||||
if (Dungeon.level.heroFOV[pos]){
|
||||
Notes.add(Notes.Landmark.RAT_KING);
|
||||
}
|
||||
}
|
||||
return super.act();
|
||||
}
|
||||
|
||||
@@ -22,14 +22,31 @@
|
||||
package com.shatteredpixel.shatteredpixeldungeon.journal;
|
||||
|
||||
import com.shatteredpixel.shatteredpixeldungeon.Dungeon;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.blobs.Foliage;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.blobs.SacrificialFire;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.blobs.WaterOfAwareness;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.blobs.WaterOfHealth;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.DemonSpawner;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.Statue;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.npcs.Blacksmith;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.npcs.Ghost;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.npcs.Imp;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.npcs.ImpShopkeeper;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.npcs.RatKing;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.npcs.Shopkeeper;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.npcs.Wandmaker;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.Generator;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.keys.Key;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.levels.Level;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.levels.rooms.special.WeakFloorRoom;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.messages.Messages;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.scenes.PixelScene;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.sprites.BlacksmithSprite;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.sprites.GhostSprite;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.sprites.ImpSprite;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSprite;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.sprites.RatKingSprite;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.sprites.ShopkeeperSprite;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.sprites.SpawnerSprite;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.sprites.StatueSprite;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.sprites.WandmakerSprite;
|
||||
@@ -42,6 +59,7 @@ import com.watabou.utils.Bundle;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.Comparator;
|
||||
|
||||
public class Notes {
|
||||
|
||||
@@ -94,27 +112,22 @@ public class Notes {
|
||||
TRAPS_FLOOR,
|
||||
SECRETS_FLOOR,
|
||||
|
||||
//more special room landmarks?
|
||||
// distant well
|
||||
WELL_OF_HEALTH,
|
||||
WELL_OF_AWARENESS,
|
||||
SHOP,
|
||||
ALCHEMY,
|
||||
GARDEN,
|
||||
STATUE,
|
||||
DISTANT_WELL,
|
||||
WELL_OF_HEALTH,
|
||||
WELL_OF_AWARENESS,
|
||||
SACRIFICIAL_FIRE,
|
||||
SHOP,
|
||||
STATUE,
|
||||
|
||||
GHOST,
|
||||
RAT_KING,
|
||||
WANDMAKER,
|
||||
TROLL,
|
||||
IMP,
|
||||
//rat king?
|
||||
|
||||
DEMON_SPAWNER;
|
||||
|
||||
public String title() {
|
||||
return Messages.get(this, name());
|
||||
}
|
||||
}
|
||||
|
||||
public static class LandmarkRecord extends Record {
|
||||
@@ -133,54 +146,43 @@ public class Notes {
|
||||
default:
|
||||
return Icons.STAIRS.get();
|
||||
|
||||
//TODO using a 2x bloated sprite isn't ideal..
|
||||
// but I want them to visually match what's in the game scene
|
||||
case CHASM_FLOOR:
|
||||
Image result = Icons.DEPTH_CHASM.get();
|
||||
result.scale.set(2f);
|
||||
return result;
|
||||
return Icons.STAIRS_CHASM.get();
|
||||
case WATER_FLOOR:
|
||||
result = Icons.DEPTH_WATER.get();
|
||||
result.scale.set(2f);
|
||||
return result;
|
||||
return Icons.STAIRS_WATER.get();
|
||||
case GRASS_FLOOR:
|
||||
result = Icons.DEPTH_GRASS.get();
|
||||
result.scale.set(2f);
|
||||
return result;
|
||||
return Icons.STAIRS_GRASS.get();
|
||||
case DARK_FLOOR:
|
||||
result = Icons.DEPTH_DARK.get();
|
||||
result.scale.set(2f);
|
||||
return result;
|
||||
return Icons.STAIRS_DARK.get();
|
||||
case LARGE_FLOOR:
|
||||
result = Icons.DEPTH_LARGE.get();
|
||||
result.scale.set(2f);
|
||||
return result;
|
||||
return Icons.STAIRS_LARGE.get();
|
||||
case TRAPS_FLOOR:
|
||||
result = Icons.DEPTH_TRAPS.get();
|
||||
result.scale.set(2f);
|
||||
return result;
|
||||
return Icons.STAIRS_TRAPS.get();
|
||||
case SECRETS_FLOOR:
|
||||
result = Icons.DEPTH_SECRETS.get();
|
||||
result.scale.set(2f);
|
||||
return result;
|
||||
return Icons.STAIRS_SECRETS.get();
|
||||
|
||||
case WELL_OF_HEALTH:
|
||||
return Icons.get(Icons.WELL_HEALTH);
|
||||
case WELL_OF_AWARENESS:
|
||||
return Icons.get(Icons.WELL_AWARENESS);
|
||||
case SHOP:
|
||||
if (depth == 20) return new Image(new ImpSprite());
|
||||
else return new Image(new ShopkeeperSprite());
|
||||
case ALCHEMY:
|
||||
return Icons.get(Icons.ALCHEMY);
|
||||
case GARDEN:
|
||||
return Icons.get(Icons.GRASS);
|
||||
case STATUE:
|
||||
return new Image(new StatueSprite());
|
||||
case DISTANT_WELL:
|
||||
return Icons.get(Icons.DISTANT_WELL);
|
||||
case WELL_OF_HEALTH:
|
||||
return Icons.get(Icons.WELL_HEALTH);
|
||||
case WELL_OF_AWARENESS:
|
||||
return Icons.get(Icons.WELL_AWARENESS);
|
||||
case SACRIFICIAL_FIRE:
|
||||
return Icons.get(Icons.SACRIFICE_ALTAR);
|
||||
case SHOP:
|
||||
return Icons.get(Icons.GOLD);
|
||||
case STATUE:
|
||||
return new Image(new StatueSprite());
|
||||
|
||||
case GHOST:
|
||||
return new Image(new GhostSprite());
|
||||
case RAT_KING:
|
||||
return new Image(new RatKingSprite());
|
||||
case WANDMAKER:
|
||||
return new Image(new WandmakerSprite());
|
||||
case TROLL:
|
||||
@@ -196,7 +198,7 @@ public class Notes {
|
||||
@Override
|
||||
public String title() {
|
||||
switch (landmark) {
|
||||
default: landmark.title();
|
||||
default: return Messages.get(Landmark.class, landmark.name());
|
||||
case CHASM_FLOOR: return Messages.get(Level.Feeling.class, "chasm_title");
|
||||
case WATER_FLOOR: return Messages.get(Level.Feeling.class, "water_title");
|
||||
case GRASS_FLOOR: return Messages.get(Level.Feeling.class, "grass_title");
|
||||
@@ -210,7 +212,8 @@ public class Notes {
|
||||
@Override
|
||||
public String desc() {
|
||||
switch (landmark) {
|
||||
default: return "";
|
||||
default: return "";
|
||||
|
||||
case CHASM_FLOOR: return Messages.get(Level.Feeling.class, "chasm_desc");
|
||||
case WATER_FLOOR: return Messages.get(Level.Feeling.class, "water_desc");
|
||||
case GRASS_FLOOR: return Messages.get(Level.Feeling.class, "grass_desc");
|
||||
@@ -218,6 +221,25 @@ public class Notes {
|
||||
case LARGE_FLOOR: return Messages.get(Level.Feeling.class, "large_desc");
|
||||
case TRAPS_FLOOR: return Messages.get(Level.Feeling.class, "traps_desc");
|
||||
case SECRETS_FLOOR: return Messages.get(Level.Feeling.class, "secrets_desc");
|
||||
|
||||
case SHOP:
|
||||
if (depth == 20) return Messages.get(ImpShopkeeper.class, "desc");
|
||||
else return Messages.get(Shopkeeper.class, "desc");
|
||||
case ALCHEMY: return Messages.get(Level.class, "alchemy_desc");
|
||||
case GARDEN: return Messages.get(Foliage.class, "desc");
|
||||
case DISTANT_WELL: return Messages.get(WeakFloorRoom.HiddenWell.class, "desc");
|
||||
case WELL_OF_HEALTH: return Messages.get(WaterOfHealth.class, "desc");
|
||||
case WELL_OF_AWARENESS: return Messages.get(WaterOfAwareness.class, "desc");
|
||||
case SACRIFICIAL_FIRE: return Messages.get(SacrificialFire.class, "desc");
|
||||
case STATUE: return Messages.get(Statue.class, "desc");
|
||||
|
||||
case GHOST: return Messages.get(Ghost.class, "desc");
|
||||
case RAT_KING: return Messages.get(RatKing.class, "desc");
|
||||
case WANDMAKER: return Messages.get(Wandmaker.class, "desc");
|
||||
case TROLL: return Messages.get(Blacksmith.class, "desc");
|
||||
case IMP: return Messages.get(Imp.class, "desc");
|
||||
|
||||
case DEMON_SPAWNER: return Messages.get(DemonSpawner.class, "desc");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -405,16 +427,32 @@ public class Notes {
|
||||
ArrayList<Record> filtered = new ArrayList<>();
|
||||
for (Record rec : records){
|
||||
if (rec.depth() == depth){
|
||||
if (rec instanceof KeyRecord){
|
||||
filtered.add(rec); //key records always go at the end
|
||||
} else {
|
||||
filtered.add(0, rec);
|
||||
}
|
||||
|
||||
filtered.add(rec);
|
||||
}
|
||||
}
|
||||
|
||||
Collections.sort(filtered, comparator);
|
||||
|
||||
return filtered;
|
||||
}
|
||||
|
||||
private static final Comparator<Record> comparator = new Comparator<Record>() {
|
||||
@Override
|
||||
public int compare(Record r1, Record r2) {
|
||||
if (r1 instanceof LandmarkRecord){
|
||||
if (r2 instanceof LandmarkRecord){
|
||||
return ((LandmarkRecord) r1).landmark.ordinal() - ((LandmarkRecord) r2).landmark.ordinal();
|
||||
} else {
|
||||
return -1;
|
||||
}
|
||||
} else if (r2 instanceof LandmarkRecord){
|
||||
return 1;
|
||||
} else {
|
||||
//matches order in key display
|
||||
return Generator.Category.order(((KeyRecord)r2).key) - Generator.Category.order(((KeyRecord)r1).key);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
public static void remove( Record rec ){
|
||||
records.remove(rec);
|
||||
|
||||
@@ -23,6 +23,8 @@ package com.shatteredpixel.shatteredpixeldungeon.levels.rooms.special;
|
||||
|
||||
import com.shatteredpixel.shatteredpixeldungeon.Assets;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.Dungeon;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.blobs.Blob;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.journal.Notes;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.levels.Level;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.levels.Terrain;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.levels.painters.Painter;
|
||||
@@ -70,6 +72,8 @@ public class WeakFloorRoom extends SpecialRoom {
|
||||
CustomTilemap vis = new HiddenWell();
|
||||
vis.pos(well.x, well.y);
|
||||
level.customTiles.add(vis);
|
||||
|
||||
Blob.seed( well.x + level.width() * well.y, 1, WellID.class, level );
|
||||
}
|
||||
|
||||
public static class HiddenWell extends CustomTilemap {
|
||||
@@ -97,4 +101,29 @@ public class WeakFloorRoom extends SpecialRoom {
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
//we use a blob to track visibility of the well, yes this sucks
|
||||
public static class WellID extends Blob {
|
||||
|
||||
@Override
|
||||
protected void evolve() {
|
||||
int cell;
|
||||
for (int i=area.top-1; i <= area.bottom; i++) {
|
||||
for (int j = area.left-1; j <= area.right; j++) {
|
||||
cell = j + i* Dungeon.level.width();
|
||||
if (Dungeon.level.insideMap(cell)) {
|
||||
off[cell] = cur[cell];
|
||||
|
||||
volume += off[cell];
|
||||
if (off[cell] > 0 && Dungeon.level.visited[cell]){
|
||||
Notes.add( Notes.Landmark.DISTANT_WELL );
|
||||
fullyClear(); //deletes itself after fulfilling its purpose
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -77,7 +77,6 @@ public enum Icons {
|
||||
COPY,
|
||||
PASTE,
|
||||
|
||||
STAIRS,
|
||||
BACKPACK_LRG,
|
||||
TALENT,
|
||||
MAGNIFY,
|
||||
@@ -86,9 +85,19 @@ public enum Icons {
|
||||
CATALOG,
|
||||
ALCHEMY,
|
||||
GRASS,
|
||||
|
||||
STAIRS,
|
||||
STAIRS_CHASM,
|
||||
STAIRS_WATER,
|
||||
STAIRS_GRASS,
|
||||
STAIRS_DARK,
|
||||
STAIRS_LARGE,
|
||||
STAIRS_TRAPS,
|
||||
STAIRS_SECRETS,
|
||||
WELL_HEALTH,
|
||||
WELL_AWARENESS,
|
||||
SACRIFICE_ALTAR,
|
||||
DISTANT_WELL,
|
||||
|
||||
//smaller icons, variable spacing
|
||||
SKULL,
|
||||
@@ -252,108 +261,133 @@ public enum Icons {
|
||||
icon.frame( icon.texture.uvRectBySize( 192, 32, 13, 13 ) );
|
||||
break;
|
||||
|
||||
case STAIRS:
|
||||
icon.frame( icon.texture.uvRectBySize( 0, 48, 13, 16 ) );
|
||||
break;
|
||||
case BACKPACK_LRG:
|
||||
icon.frame( icon.texture.uvRectBySize( 16, 48, 16, 16 ) );
|
||||
icon.frame( icon.texture.uvRectBySize( 0, 48, 16, 16 ) );
|
||||
break;
|
||||
case TALENT:
|
||||
icon.frame( icon.texture.uvRectBySize( 32, 48, 13, 13 ) );
|
||||
icon.frame( icon.texture.uvRectBySize( 16, 48, 13, 13 ) );
|
||||
break;
|
||||
case MAGNIFY:
|
||||
icon.frame( icon.texture.uvRectBySize( 48, 48, 14, 14 ) );
|
||||
icon.frame( icon.texture.uvRectBySize( 32, 48, 14, 14 ) );
|
||||
break;
|
||||
case SNAKE:
|
||||
icon.frame( icon.texture.uvRectBySize( 64, 48, 9, 13 ) );
|
||||
icon.frame( icon.texture.uvRectBySize( 48, 48, 9, 13 ) );
|
||||
break;
|
||||
case BUFFS:
|
||||
icon.frame( icon.texture.uvRectBySize( 80, 48, 16, 15 ) );
|
||||
icon.frame( icon.texture.uvRectBySize( 64, 48, 16, 15 ) );
|
||||
break;
|
||||
case CATALOG:
|
||||
icon.frame( icon.texture.uvRectBySize( 96, 48, 13, 16 ) );
|
||||
icon.frame( icon.texture.uvRectBySize( 80, 48, 13, 16 ) );
|
||||
break;
|
||||
case ALCHEMY:
|
||||
icon.frame( icon.texture.uvRectBySize( 112, 48, 16, 16 ) );
|
||||
icon.frame( icon.texture.uvRectBySize( 96, 48, 16, 16 ) );
|
||||
break;
|
||||
case GRASS:
|
||||
icon.frame( icon.texture.uvRectBySize( 128, 48, 16, 16 ) );
|
||||
icon.frame( icon.texture.uvRectBySize( 112, 48, 16, 16 ) );
|
||||
break;
|
||||
|
||||
case STAIRS:
|
||||
icon.frame( icon.texture.uvRectBySize( 0, 64, 15, 16 ) );
|
||||
break;
|
||||
case STAIRS_CHASM:
|
||||
icon.frame( icon.texture.uvRectBySize( 16, 64, 15, 16 ) );
|
||||
break;
|
||||
case STAIRS_WATER:
|
||||
icon.frame( icon.texture.uvRectBySize( 32, 64, 15, 16 ) );
|
||||
break;
|
||||
case STAIRS_GRASS:
|
||||
icon.frame( icon.texture.uvRectBySize( 48, 64, 15, 16 ) );
|
||||
break;
|
||||
case STAIRS_DARK:
|
||||
icon.frame( icon.texture.uvRectBySize( 64, 64, 15, 16 ) );
|
||||
break;
|
||||
case STAIRS_LARGE:
|
||||
icon.frame( icon.texture.uvRectBySize( 80, 64, 15, 16 ) );
|
||||
break;
|
||||
case STAIRS_TRAPS:
|
||||
icon.frame( icon.texture.uvRectBySize( 96, 64, 15, 16 ) );
|
||||
break;
|
||||
case STAIRS_SECRETS:
|
||||
icon.frame( icon.texture.uvRectBySize( 112, 64, 15, 16 ) );
|
||||
break;
|
||||
case WELL_HEALTH:
|
||||
icon.frame( icon.texture.uvRectBySize( 144, 48, 16, 16 ) );
|
||||
icon.frame( icon.texture.uvRectBySize( 128, 64, 16, 16 ) );
|
||||
break;
|
||||
case WELL_AWARENESS:
|
||||
icon.frame( icon.texture.uvRectBySize( 160, 48, 16, 16 ) );
|
||||
icon.frame( icon.texture.uvRectBySize( 144, 64, 16, 16 ) );
|
||||
break;
|
||||
case SACRIFICE_ALTAR:
|
||||
icon.frame( icon.texture.uvRectBySize( 176, 48, 16, 16 ) );
|
||||
icon.frame( icon.texture.uvRectBySize( 160, 64, 16, 16 ) );
|
||||
break;
|
||||
case DISTANT_WELL:
|
||||
icon.frame( icon.texture.uvRectBySize( 176, 64, 16, 16 ) );
|
||||
break;
|
||||
|
||||
case SKULL:
|
||||
icon.frame( icon.texture.uvRectBySize( 0, 64, 8, 8 ) );
|
||||
icon.frame( icon.texture.uvRectBySize( 0, 80, 8, 8 ) );
|
||||
break;
|
||||
case BUSY:
|
||||
icon.frame( icon.texture.uvRectBySize( 8, 64, 8, 8 ) );
|
||||
icon.frame( icon.texture.uvRectBySize( 8, 80, 8, 8 ) );
|
||||
break;
|
||||
case COMPASS:
|
||||
icon.frame( icon.texture.uvRectBySize( 0, 72, 7, 5 ) );
|
||||
icon.frame( icon.texture.uvRectBySize( 0, 88, 7, 5 ) );
|
||||
break;
|
||||
case SLEEP:
|
||||
icon.frame( icon.texture.uvRectBySize( 16, 64, 9, 8 ) );
|
||||
icon.frame( icon.texture.uvRectBySize( 16, 80, 9, 8 ) );
|
||||
break;
|
||||
case ALERT:
|
||||
icon.frame( icon.texture.uvRectBySize( 16, 72, 8, 8 ) );
|
||||
icon.frame( icon.texture.uvRectBySize( 16, 88, 8, 8 ) );
|
||||
break;
|
||||
case LOST:
|
||||
icon.frame( icon.texture.uvRectBySize( 24, 72, 8, 8 ) );
|
||||
icon.frame( icon.texture.uvRectBySize( 24, 88, 8, 8 ) );
|
||||
break;
|
||||
case DEPTH:
|
||||
icon.frame( icon.texture.uvRectBySize( 32 + runTypeOfsX(), 64 + runTypeOfsY(), 6, 7 ) );
|
||||
icon.frame( icon.texture.uvRectBySize( 32 + runTypeOfsX(), 80 + runTypeOfsY(), 6, 7 ) );
|
||||
break;
|
||||
case DEPTH_CHASM:
|
||||
icon.frame( icon.texture.uvRectBySize( 40 + runTypeOfsX(), 64 + runTypeOfsY(), 7, 7 ) );
|
||||
icon.frame( icon.texture.uvRectBySize( 40 + runTypeOfsX(), 80 + runTypeOfsY(), 7, 7 ) );
|
||||
break;
|
||||
case DEPTH_WATER:
|
||||
icon.frame( icon.texture.uvRectBySize( 48 + runTypeOfsX(), 64 + runTypeOfsY(), 7, 7 ) );
|
||||
icon.frame( icon.texture.uvRectBySize( 48 + runTypeOfsX(), 80 + runTypeOfsY(), 7, 7 ) );
|
||||
break;
|
||||
case DEPTH_GRASS:
|
||||
icon.frame( icon.texture.uvRectBySize( 56 + runTypeOfsX(), 64 + runTypeOfsY(), 7, 7 ) );
|
||||
icon.frame( icon.texture.uvRectBySize( 56 + runTypeOfsX(), 80 + runTypeOfsY(), 7, 7 ) );
|
||||
break;
|
||||
case DEPTH_DARK:
|
||||
icon.frame( icon.texture.uvRectBySize( 64 + runTypeOfsX(), 64 + runTypeOfsY(), 7, 7 ) );
|
||||
icon.frame( icon.texture.uvRectBySize( 64 + runTypeOfsX(), 80 + runTypeOfsY(), 7, 7 ) );
|
||||
break;
|
||||
case DEPTH_LARGE:
|
||||
icon.frame( icon.texture.uvRectBySize( 72 + runTypeOfsX(), 64 + runTypeOfsY(), 7, 7 ) );
|
||||
icon.frame( icon.texture.uvRectBySize( 72 + runTypeOfsX(), 80 + runTypeOfsY(), 7, 7 ) );
|
||||
break;
|
||||
case DEPTH_TRAPS:
|
||||
icon.frame( icon.texture.uvRectBySize( 80 + runTypeOfsX(), 64 + runTypeOfsY(), 7, 7 ) );
|
||||
icon.frame( icon.texture.uvRectBySize( 80 + runTypeOfsX(), 80 + runTypeOfsY(), 7, 7 ) );
|
||||
break;
|
||||
case DEPTH_SECRETS:
|
||||
icon.frame( icon.texture.uvRectBySize( 88 + runTypeOfsX(), 64 + runTypeOfsY(), 7, 7 ) );
|
||||
icon.frame( icon.texture.uvRectBySize( 88 + runTypeOfsX(), 80 + runTypeOfsY(), 7, 7 ) );
|
||||
break;
|
||||
case CHAL_COUNT:
|
||||
icon.frame( icon.texture.uvRectBySize( 160, 64, 7, 7 ) );
|
||||
icon.frame( icon.texture.uvRectBySize( 160, 80, 7, 7 ) );
|
||||
break;
|
||||
case COIN_SML:
|
||||
icon.frame( icon.texture.uvRectBySize( 168, 64, 7, 7 ) );
|
||||
icon.frame( icon.texture.uvRectBySize( 168, 80, 7, 7 ) );
|
||||
break;
|
||||
case ENERGY_SML:
|
||||
icon.frame( icon.texture.uvRectBySize( 168, 72, 8, 7 ) );
|
||||
icon.frame( icon.texture.uvRectBySize( 168, 88, 8, 7 ) );
|
||||
break;
|
||||
case BACKPACK:
|
||||
icon.frame( icon.texture.uvRectBySize( 176, 64, 10, 10 ) );
|
||||
icon.frame( icon.texture.uvRectBySize( 176, 80, 10, 10 ) );
|
||||
break;
|
||||
case SCROLL_HOLDER:
|
||||
icon.frame( icon.texture.uvRectBySize( 186, 64, 10, 10 ) );
|
||||
icon.frame( icon.texture.uvRectBySize( 186, 80, 10, 10 ) );
|
||||
break;
|
||||
case SEED_POUCH:
|
||||
icon.frame( icon.texture.uvRectBySize( 196, 64, 10, 10 ) );
|
||||
icon.frame( icon.texture.uvRectBySize( 196, 80, 10, 10 ) );
|
||||
break;
|
||||
case WAND_HOLSTER:
|
||||
icon.frame( icon.texture.uvRectBySize( 206, 64, 10, 10 ) );
|
||||
icon.frame( icon.texture.uvRectBySize( 206, 80, 10, 10 ) );
|
||||
break;
|
||||
case POTION_BANDOLIER:
|
||||
icon.frame( icon.texture.uvRectBySize( 216, 64, 10, 10 ) );
|
||||
icon.frame( icon.texture.uvRectBySize( 216, 80, 10, 10 ) );
|
||||
break;
|
||||
|
||||
case LIBGDX:
|
||||
@@ -446,4 +480,25 @@ public enum Icons {
|
||||
return get(DEPTH_SECRETS);
|
||||
}
|
||||
}
|
||||
|
||||
public static Image getLarge(Level.Feeling feeling){
|
||||
switch (feeling){
|
||||
case NONE: default:
|
||||
return get(STAIRS);
|
||||
case CHASM:
|
||||
return get(STAIRS_CHASM);
|
||||
case WATER:
|
||||
return get(STAIRS_WATER);
|
||||
case GRASS:
|
||||
return get(STAIRS_GRASS);
|
||||
case DARK:
|
||||
return get(STAIRS_DARK);
|
||||
case LARGE:
|
||||
return get(STAIRS_LARGE);
|
||||
case TRAPS:
|
||||
return get(STAIRS_TRAPS);
|
||||
case SECRETS:
|
||||
return get(STAIRS_SECRETS);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -100,10 +100,8 @@ public class MenuPane extends Component {
|
||||
if (Dungeon.level.feeling == Level.Feeling.NONE){
|
||||
GameScene.show(new WndJournal());
|
||||
} else {
|
||||
Image icon = Icons.get(Dungeon.level.feeling);
|
||||
icon.scale.set(2f);
|
||||
GameScene.show(new WndTitledMessage(icon,
|
||||
Dungeon.level.feeling.title(),
|
||||
GameScene.show(new WndTitledMessage(Icons.getLarge(Dungeon.level.feeling),
|
||||
Messages.titleCase(Dungeon.level.feeling.title()),
|
||||
Dungeon.level.feeling.desc()));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -34,6 +34,7 @@ import java.util.ArrayList;
|
||||
public class ScrollingGridPane extends ScrollPane {
|
||||
|
||||
private ArrayList<Component> items = new ArrayList<>();
|
||||
private ArrayList<ColorBlock> separators = new ArrayList<>();
|
||||
|
||||
private static final int ITEM_SIZE = 17;
|
||||
private static final int MIN_GROUP_SIZE = 3*(ITEM_SIZE+1);
|
||||
@@ -81,6 +82,8 @@ public class ScrollingGridPane extends ScrollPane {
|
||||
float left = 0;
|
||||
float top = 0;
|
||||
|
||||
int sepsUsed = 0;
|
||||
|
||||
//these variables help control logic for laying out multiple grid groups on one line
|
||||
boolean freshRow = true; //whether the previous group is still on its first row
|
||||
boolean lastWasSmallheader = false; //whether the last UI element was a header on its own
|
||||
@@ -109,6 +112,18 @@ public class ScrollingGridPane extends ScrollPane {
|
||||
if (!((GridHeader) item).center && freshRow && spaceLeft >= spaceReq){
|
||||
left = left + spacing;
|
||||
top -= item.height()+1;
|
||||
ColorBlock sep;
|
||||
if (separators.size() > sepsUsed){
|
||||
sep = separators.get(sepsUsed++);
|
||||
} else {
|
||||
sep = new ColorBlock(1, 1, 0xFF222222);
|
||||
separators.add(sep);
|
||||
content.add(sep);
|
||||
sepsUsed++;
|
||||
}
|
||||
sep.size(1, item.height()+1+ITEM_SIZE);
|
||||
sep.x = left-1;
|
||||
sep.y = y+top;
|
||||
} else {
|
||||
left = 0;
|
||||
top += ITEM_SIZE + 2;
|
||||
@@ -144,6 +159,11 @@ public class ScrollingGridPane extends ScrollPane {
|
||||
top += ITEM_SIZE+1;
|
||||
}
|
||||
|
||||
while (separators.size() > sepsUsed){
|
||||
ColorBlock sep = separators.remove(sepsUsed);
|
||||
content.remove(sep);
|
||||
}
|
||||
|
||||
content.setSize(width, top);
|
||||
}
|
||||
|
||||
|
||||
@@ -454,7 +454,7 @@ public class WndJournal extends WndTabbed {
|
||||
@Override
|
||||
public boolean onClick(float x, float y) {
|
||||
if (inside(x, y)) {
|
||||
GameScene.show(new WndTitledMessage(rec.icon(),
|
||||
GameScene.show(new WndJournalItem(rec.icon(),
|
||||
Messages.titleCase(rec.title()),
|
||||
rec.desc()));
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user