v0.6.1: renamed journal class to notes
This commit is contained in:
parent
3c5a8c9ca4
commit
1a22c5334e
|
@ -160,7 +160,7 @@ public class Dungeon {
|
||||||
Random.seed();
|
Random.seed();
|
||||||
|
|
||||||
Statistics.reset();
|
Statistics.reset();
|
||||||
Journal.reset();
|
Notes.reset();
|
||||||
|
|
||||||
quickslot.reset();
|
quickslot.reset();
|
||||||
QuickSlotButton.reset();
|
QuickSlotButton.reset();
|
||||||
|
@ -482,7 +482,7 @@ public class Dungeon {
|
||||||
SpecialRoom.storeRoomsInBundle( bundle );
|
SpecialRoom.storeRoomsInBundle( bundle );
|
||||||
|
|
||||||
Statistics.storeInBundle( bundle );
|
Statistics.storeInBundle( bundle );
|
||||||
Journal.storeInBundle( bundle );
|
Notes.storeInBundle( bundle );
|
||||||
Generator.storeInBundle( bundle );
|
Generator.storeInBundle( bundle );
|
||||||
|
|
||||||
Scroll.save( bundle );
|
Scroll.save( bundle );
|
||||||
|
@ -608,7 +608,7 @@ public class Dungeon {
|
||||||
depth = bundle.getInt( DEPTH );
|
depth = bundle.getInt( DEPTH );
|
||||||
|
|
||||||
Statistics.restoreFromBundle( bundle );
|
Statistics.restoreFromBundle( bundle );
|
||||||
Journal.restoreFromBundle( bundle );
|
Notes.restoreFromBundle( bundle );
|
||||||
Generator.restoreFromBundle( bundle );
|
Generator.restoreFromBundle( bundle );
|
||||||
|
|
||||||
droppedItems = new SparseArray<ArrayList<Item>>();
|
droppedItems = new SparseArray<ArrayList<Item>>();
|
||||||
|
|
|
@ -0,0 +1,125 @@
|
||||||
|
/*
|
||||||
|
* Pixel Dungeon
|
||||||
|
* Copyright (C) 2012-2015 Oleg Dolya
|
||||||
|
*
|
||||||
|
* Shattered Pixel Dungeon
|
||||||
|
* Copyright (C) 2014-2017 Evan Debenham
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>
|
||||||
|
*/
|
||||||
|
|
||||||
|
package com.shatteredpixel.shatteredpixeldungeon;
|
||||||
|
|
||||||
|
import com.shatteredpixel.shatteredpixeldungeon.messages.Messages;
|
||||||
|
import com.watabou.utils.Bundlable;
|
||||||
|
import com.watabou.utils.Bundle;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
|
||||||
|
public class Notes {
|
||||||
|
|
||||||
|
public enum Feature {
|
||||||
|
WELL_OF_HEALTH,
|
||||||
|
WELL_OF_AWARENESS,
|
||||||
|
WELL_OF_TRANSMUTATION,
|
||||||
|
ALCHEMY,
|
||||||
|
GARDEN,
|
||||||
|
STATUE,
|
||||||
|
|
||||||
|
GHOST,
|
||||||
|
WANDMAKER,
|
||||||
|
TROLL,
|
||||||
|
IMP;
|
||||||
|
|
||||||
|
public String desc() {
|
||||||
|
return Messages.get(this, name());
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
public static class Record implements Comparable<Record>, Bundlable {
|
||||||
|
|
||||||
|
private static final String FEATURE = "feature";
|
||||||
|
private static final String DEPTH = "depth";
|
||||||
|
|
||||||
|
public Feature feature;
|
||||||
|
public int depth;
|
||||||
|
|
||||||
|
public Record() {
|
||||||
|
}
|
||||||
|
|
||||||
|
public Record( Feature feature, int depth ) {
|
||||||
|
this.feature = feature;
|
||||||
|
this.depth = depth;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int compareTo( Record another ) {
|
||||||
|
return another.depth - depth;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void restoreFromBundle( Bundle bundle ) {
|
||||||
|
feature = Feature.valueOf( bundle.getString( FEATURE ) );
|
||||||
|
depth = bundle.getInt( DEPTH );
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void storeInBundle( Bundle bundle ) {
|
||||||
|
bundle.put( FEATURE, feature.toString() );
|
||||||
|
bundle.put( DEPTH, depth );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static ArrayList<Record> records;
|
||||||
|
|
||||||
|
public static void reset() {
|
||||||
|
records = new ArrayList<Notes.Record>();
|
||||||
|
}
|
||||||
|
|
||||||
|
private static final String JOURNAL = "journal";
|
||||||
|
|
||||||
|
public static void storeInBundle( Bundle bundle ) {
|
||||||
|
bundle.put( JOURNAL, records );
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void restoreFromBundle( Bundle bundle ) {
|
||||||
|
records = new ArrayList<Record>();
|
||||||
|
for (Bundlable rec : bundle.getCollection( JOURNAL ) ) {
|
||||||
|
records.add( (Record) rec );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void add( Feature feature ) {
|
||||||
|
int size = records.size();
|
||||||
|
for (int i=0; i < size; i++) {
|
||||||
|
Record rec = records.get( i );
|
||||||
|
if (rec.feature == feature && rec.depth == Dungeon.depth) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
records.add( new Record( feature, Dungeon.depth ) );
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void remove( Feature feature ) {
|
||||||
|
int size = records.size();
|
||||||
|
for (int i=0; i < size; i++) {
|
||||||
|
Record rec = records.get( i );
|
||||||
|
if (rec.feature == feature && rec.depth == Dungeon.depth) {
|
||||||
|
records.remove( i );
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -22,7 +22,7 @@
|
||||||
package com.shatteredpixel.shatteredpixeldungeon.actors.blobs;
|
package com.shatteredpixel.shatteredpixeldungeon.actors.blobs;
|
||||||
|
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.Dungeon;
|
import com.shatteredpixel.shatteredpixeldungeon.Dungeon;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.Journal;
|
import com.shatteredpixel.shatteredpixeldungeon.Notes;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.effects.BlobEmitter;
|
import com.shatteredpixel.shatteredpixeldungeon.effects.BlobEmitter;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.effects.Speck;
|
import com.shatteredpixel.shatteredpixeldungeon.effects.Speck;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.items.Heap;
|
import com.shatteredpixel.shatteredpixeldungeon.items.Heap;
|
||||||
|
@ -53,7 +53,7 @@ public class Alchemy extends Blob {
|
||||||
area.union(pos%Dungeon.level.width(), pos/Dungeon.level.width());
|
area.union(pos%Dungeon.level.width(), pos/Dungeon.level.width());
|
||||||
|
|
||||||
if (Dungeon.visible[pos]) {
|
if (Dungeon.visible[pos]) {
|
||||||
Journal.add( Journal.Feature.ALCHEMY );
|
Notes.add( Notes.Feature.ALCHEMY );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -22,7 +22,7 @@
|
||||||
package com.shatteredpixel.shatteredpixeldungeon.actors.blobs;
|
package com.shatteredpixel.shatteredpixeldungeon.actors.blobs;
|
||||||
|
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.Dungeon;
|
import com.shatteredpixel.shatteredpixeldungeon.Dungeon;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.Journal;
|
import com.shatteredpixel.shatteredpixeldungeon.Notes;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Buff;
|
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Buff;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Shadows;
|
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Shadows;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Hero;
|
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Hero;
|
||||||
|
@ -69,7 +69,7 @@ public class Foliage extends Blob {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (visible) {
|
if (visible) {
|
||||||
Journal.add( Journal.Feature.GARDEN );
|
Notes.add( Notes.Feature.GARDEN );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -24,9 +24,8 @@ package com.shatteredpixel.shatteredpixeldungeon.actors.blobs;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.Assets;
|
import com.shatteredpixel.shatteredpixeldungeon.Assets;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.Badges;
|
import com.shatteredpixel.shatteredpixeldungeon.Badges;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.Dungeon;
|
import com.shatteredpixel.shatteredpixeldungeon.Dungeon;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.tiles.DungeonTilemap;
|
import com.shatteredpixel.shatteredpixeldungeon.Notes;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.Journal;
|
import com.shatteredpixel.shatteredpixeldungeon.Notes.Feature;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.Journal.Feature;
|
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Awareness;
|
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Awareness;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Buff;
|
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Buff;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Hero;
|
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Hero;
|
||||||
|
@ -37,6 +36,7 @@ import com.shatteredpixel.shatteredpixeldungeon.items.Item;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.levels.Terrain;
|
import com.shatteredpixel.shatteredpixeldungeon.levels.Terrain;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.messages.Messages;
|
import com.shatteredpixel.shatteredpixeldungeon.messages.Messages;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.scenes.GameScene;
|
import com.shatteredpixel.shatteredpixeldungeon.scenes.GameScene;
|
||||||
|
import com.shatteredpixel.shatteredpixeldungeon.tiles.DungeonTilemap;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.utils.GLog;
|
import com.shatteredpixel.shatteredpixeldungeon.utils.GLog;
|
||||||
import com.watabou.noosa.audio.Sample;
|
import com.watabou.noosa.audio.Sample;
|
||||||
|
|
||||||
|
@ -70,7 +70,7 @@ public class WaterOfAwareness extends WellWater {
|
||||||
|
|
||||||
GLog.p( Messages.get(this, "procced") );
|
GLog.p( Messages.get(this, "procced") );
|
||||||
|
|
||||||
Journal.remove( Feature.WELL_OF_AWARENESS );
|
Notes.remove( Feature.WELL_OF_AWARENESS );
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -85,7 +85,7 @@ public class WaterOfAwareness extends WellWater {
|
||||||
|
|
||||||
emitter.parent.add( new Identification( DungeonTilemap.tileCenterToWorld( pos ) ) );
|
emitter.parent.add( new Identification( DungeonTilemap.tileCenterToWorld( pos ) ) );
|
||||||
|
|
||||||
Journal.remove( Feature.WELL_OF_AWARENESS );
|
Notes.remove( Feature.WELL_OF_AWARENESS );
|
||||||
|
|
||||||
return item;
|
return item;
|
||||||
}
|
}
|
||||||
|
|
|
@ -23,8 +23,8 @@ package com.shatteredpixel.shatteredpixeldungeon.actors.blobs;
|
||||||
|
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.Assets;
|
import com.shatteredpixel.shatteredpixeldungeon.Assets;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.Dungeon;
|
import com.shatteredpixel.shatteredpixeldungeon.Dungeon;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.Journal;
|
import com.shatteredpixel.shatteredpixeldungeon.Notes;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.Journal.Feature;
|
import com.shatteredpixel.shatteredpixeldungeon.Notes.Feature;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Hunger;
|
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Hunger;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Hero;
|
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Hero;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.effects.BlobEmitter;
|
import com.shatteredpixel.shatteredpixeldungeon.effects.BlobEmitter;
|
||||||
|
@ -55,7 +55,7 @@ public class WaterOfHealth extends WellWater {
|
||||||
|
|
||||||
GLog.p( Messages.get(this, "procced") );
|
GLog.p( Messages.get(this, "procced") );
|
||||||
|
|
||||||
Journal.remove( Feature.WELL_OF_HEALTH );
|
Notes.remove( Feature.WELL_OF_HEALTH );
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -64,7 +64,7 @@ public class WaterOfHealth extends WellWater {
|
||||||
protected Item affectItem( Item item ) {
|
protected Item affectItem( Item item ) {
|
||||||
if (item instanceof DewVial && !((DewVial)item).isFull()) {
|
if (item instanceof DewVial && !((DewVial)item).isFull()) {
|
||||||
((DewVial)item).fill();
|
((DewVial)item).fill();
|
||||||
Journal.remove( Feature.WELL_OF_HEALTH );
|
Notes.remove( Feature.WELL_OF_HEALTH );
|
||||||
return item;
|
return item;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -21,8 +21,8 @@
|
||||||
|
|
||||||
package com.shatteredpixel.shatteredpixeldungeon.actors.blobs;
|
package com.shatteredpixel.shatteredpixeldungeon.actors.blobs;
|
||||||
|
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.Journal;
|
import com.shatteredpixel.shatteredpixeldungeon.Notes;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.Journal.Feature;
|
import com.shatteredpixel.shatteredpixeldungeon.Notes.Feature;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.ShatteredPixelDungeon;
|
import com.shatteredpixel.shatteredpixeldungeon.ShatteredPixelDungeon;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.effects.BlobEmitter;
|
import com.shatteredpixel.shatteredpixeldungeon.effects.BlobEmitter;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.effects.Speck;
|
import com.shatteredpixel.shatteredpixeldungeon.effects.Speck;
|
||||||
|
@ -71,7 +71,7 @@ public class WaterOfTransmutation extends WellWater {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (item != null) {
|
if (item != null) {
|
||||||
Journal.remove( Feature.WELL_OF_TRANSMUTATION );
|
Notes.remove( Feature.WELL_OF_TRANSMUTATION );
|
||||||
}
|
}
|
||||||
|
|
||||||
return item;
|
return item;
|
||||||
|
|
|
@ -22,8 +22,8 @@
|
||||||
package com.shatteredpixel.shatteredpixeldungeon.actors.blobs;
|
package com.shatteredpixel.shatteredpixeldungeon.actors.blobs;
|
||||||
|
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.Dungeon;
|
import com.shatteredpixel.shatteredpixeldungeon.Dungeon;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.Journal;
|
import com.shatteredpixel.shatteredpixeldungeon.Notes;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.Journal.Feature;
|
import com.shatteredpixel.shatteredpixeldungeon.Notes.Feature;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Hero;
|
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Hero;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.items.Heap;
|
import com.shatteredpixel.shatteredpixeldungeon.items.Heap;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.items.Item;
|
import com.shatteredpixel.shatteredpixeldungeon.items.Item;
|
||||||
|
@ -58,11 +58,11 @@ public class WellWater extends Blob {
|
||||||
|
|
||||||
if (Dungeon.visible[pos]) {
|
if (Dungeon.visible[pos]) {
|
||||||
if (this instanceof WaterOfAwareness) {
|
if (this instanceof WaterOfAwareness) {
|
||||||
Journal.add( Feature.WELL_OF_AWARENESS );
|
Notes.add( Feature.WELL_OF_AWARENESS );
|
||||||
} else if (this instanceof WaterOfHealth) {
|
} else if (this instanceof WaterOfHealth) {
|
||||||
Journal.add( Feature.WELL_OF_HEALTH );
|
Notes.add( Feature.WELL_OF_HEALTH );
|
||||||
} else if (this instanceof WaterOfTransmutation) {
|
} else if (this instanceof WaterOfTransmutation) {
|
||||||
Journal.add( Feature.WELL_OF_TRANSMUTATION );
|
Notes.add( Feature.WELL_OF_TRANSMUTATION );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -22,7 +22,7 @@
|
||||||
package com.shatteredpixel.shatteredpixeldungeon.actors.mobs;
|
package com.shatteredpixel.shatteredpixeldungeon.actors.mobs;
|
||||||
|
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.Dungeon;
|
import com.shatteredpixel.shatteredpixeldungeon.Dungeon;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.Journal;
|
import com.shatteredpixel.shatteredpixeldungeon.Notes;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.actors.Char;
|
import com.shatteredpixel.shatteredpixeldungeon.actors.Char;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.actors.blobs.ToxicGas;
|
import com.shatteredpixel.shatteredpixeldungeon.actors.blobs.ToxicGas;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Poison;
|
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Poison;
|
||||||
|
@ -80,7 +80,7 @@ public class Statue extends Mob {
|
||||||
@Override
|
@Override
|
||||||
protected boolean act() {
|
protected boolean act() {
|
||||||
if (Dungeon.visible[pos]) {
|
if (Dungeon.visible[pos]) {
|
||||||
Journal.add( Journal.Feature.STATUE );
|
Notes.add( Notes.Feature.STATUE );
|
||||||
}
|
}
|
||||||
return super.act();
|
return super.act();
|
||||||
}
|
}
|
||||||
|
@ -139,7 +139,7 @@ public class Statue extends Mob {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void destroy() {
|
public void destroy() {
|
||||||
Journal.remove( Journal.Feature.STATUE );
|
Notes.remove( Notes.Feature.STATUE );
|
||||||
super.destroy();
|
super.destroy();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -24,7 +24,7 @@ package com.shatteredpixel.shatteredpixeldungeon.actors.mobs.npcs;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.Assets;
|
import com.shatteredpixel.shatteredpixeldungeon.Assets;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.Badges;
|
import com.shatteredpixel.shatteredpixeldungeon.Badges;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.Dungeon;
|
import com.shatteredpixel.shatteredpixeldungeon.Dungeon;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.Journal;
|
import com.shatteredpixel.shatteredpixeldungeon.Notes;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.actors.Char;
|
import com.shatteredpixel.shatteredpixeldungeon.actors.Char;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Buff;
|
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Buff;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.items.EquipableItem;
|
import com.shatteredpixel.shatteredpixeldungeon.items.EquipableItem;
|
||||||
|
@ -86,7 +86,7 @@ public class Blacksmith extends NPC {
|
||||||
}
|
}
|
||||||
} );
|
} );
|
||||||
|
|
||||||
Journal.add( Journal.Feature.TROLL );
|
Notes.add( Notes.Feature.TROLL );
|
||||||
|
|
||||||
} else if (!Quest.completed) {
|
} else if (!Quest.completed) {
|
||||||
if (Quest.alternative) {
|
if (Quest.alternative) {
|
||||||
|
@ -203,7 +203,7 @@ public class Blacksmith extends NPC {
|
||||||
|
|
||||||
Quest.reforged = true;
|
Quest.reforged = true;
|
||||||
|
|
||||||
Journal.remove( Journal.Feature.TROLL );
|
Notes.remove( Notes.Feature.TROLL );
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -23,7 +23,7 @@ package com.shatteredpixel.shatteredpixeldungeon.actors.mobs.npcs;
|
||||||
|
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.Assets;
|
import com.shatteredpixel.shatteredpixeldungeon.Assets;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.Dungeon;
|
import com.shatteredpixel.shatteredpixeldungeon.Dungeon;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.Journal;
|
import com.shatteredpixel.shatteredpixeldungeon.Notes;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.ShatteredPixelDungeon;
|
import com.shatteredpixel.shatteredpixeldungeon.ShatteredPixelDungeon;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.actors.Char;
|
import com.shatteredpixel.shatteredpixeldungeon.actors.Char;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Buff;
|
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Buff;
|
||||||
|
@ -170,7 +170,7 @@ public class Ghost extends NPC {
|
||||||
GameScene.add(questBoss);
|
GameScene.add(questBoss);
|
||||||
GameScene.show( new WndQuest( this, txt_quest ) );
|
GameScene.show( new WndQuest( this, txt_quest ) );
|
||||||
Quest.given = true;
|
Quest.given = true;
|
||||||
Journal.add( Journal.Feature.GHOST );
|
Notes.add( Notes.Feature.GHOST );
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -342,7 +342,7 @@ public class Ghost extends NPC {
|
||||||
weapon = null;
|
weapon = null;
|
||||||
armor = null;
|
armor = null;
|
||||||
|
|
||||||
Journal.remove( Journal.Feature.GHOST );
|
Notes.remove( Notes.Feature.GHOST );
|
||||||
}
|
}
|
||||||
|
|
||||||
public static boolean completed(){
|
public static boolean completed(){
|
||||||
|
|
|
@ -22,7 +22,7 @@
|
||||||
package com.shatteredpixel.shatteredpixeldungeon.actors.mobs.npcs;
|
package com.shatteredpixel.shatteredpixeldungeon.actors.mobs.npcs;
|
||||||
|
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.Dungeon;
|
import com.shatteredpixel.shatteredpixeldungeon.Dungeon;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.Journal;
|
import com.shatteredpixel.shatteredpixeldungeon.Notes;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.actors.Char;
|
import com.shatteredpixel.shatteredpixeldungeon.actors.Char;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Buff;
|
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Buff;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.Golem;
|
import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.Golem;
|
||||||
|
@ -105,7 +105,7 @@ public class Imp extends NPC {
|
||||||
Quest.given = true;
|
Quest.given = true;
|
||||||
Quest.completed = false;
|
Quest.completed = false;
|
||||||
|
|
||||||
Journal.add( Journal.Feature.IMP );
|
Notes.add( Notes.Feature.IMP );
|
||||||
}
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
|
@ -214,7 +214,7 @@ public class Imp extends NPC {
|
||||||
reward = null;
|
reward = null;
|
||||||
completed = true;
|
completed = true;
|
||||||
|
|
||||||
Journal.remove( Journal.Feature.IMP );
|
Notes.remove( Notes.Feature.IMP );
|
||||||
}
|
}
|
||||||
|
|
||||||
public static boolean isCompleted() {
|
public static boolean isCompleted() {
|
||||||
|
|
|
@ -23,7 +23,7 @@ package com.shatteredpixel.shatteredpixeldungeon.actors.mobs.npcs;
|
||||||
|
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.Challenges;
|
import com.shatteredpixel.shatteredpixeldungeon.Challenges;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.Dungeon;
|
import com.shatteredpixel.shatteredpixeldungeon.Dungeon;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.Journal;
|
import com.shatteredpixel.shatteredpixeldungeon.Notes;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.actors.Char;
|
import com.shatteredpixel.shatteredpixeldungeon.actors.Char;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Buff;
|
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Buff;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.items.Generator;
|
import com.shatteredpixel.shatteredpixeldungeon.items.Generator;
|
||||||
|
@ -163,7 +163,7 @@ public class Wandmaker extends NPC {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
Journal.add( Journal.Feature.WANDMAKER );
|
Notes.add( Notes.Feature.WANDMAKER );
|
||||||
Quest.given = true;
|
Quest.given = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -307,7 +307,7 @@ public class Wandmaker extends NPC {
|
||||||
wand1 = null;
|
wand1 = null;
|
||||||
wand2 = null;
|
wand2 = null;
|
||||||
|
|
||||||
Journal.remove( Journal.Feature.WANDMAKER );
|
Notes.remove( Notes.Feature.WANDMAKER );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -22,7 +22,7 @@
|
||||||
package com.shatteredpixel.shatteredpixeldungeon.windows;
|
package com.shatteredpixel.shatteredpixeldungeon.windows;
|
||||||
|
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.Dungeon;
|
import com.shatteredpixel.shatteredpixeldungeon.Dungeon;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.Journal;
|
import com.shatteredpixel.shatteredpixeldungeon.Notes;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.ShatteredPixelDungeon;
|
import com.shatteredpixel.shatteredpixeldungeon.ShatteredPixelDungeon;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.items.Item;
|
import com.shatteredpixel.shatteredpixeldungeon.items.Item;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.items.keys.GoldenKey;
|
import com.shatteredpixel.shatteredpixeldungeon.items.keys.GoldenKey;
|
||||||
|
@ -62,7 +62,7 @@ public class WndJournal extends WndTabbed {
|
||||||
|
|
||||||
private static final int ITEM_HEIGHT = 18;
|
private static final int ITEM_HEIGHT = 18;
|
||||||
|
|
||||||
private Notes notes;
|
private NotesTab notesTab;
|
||||||
private CatalogTab catalogTab;
|
private CatalogTab catalogTab;
|
||||||
|
|
||||||
public static int last_index = 0;
|
public static int last_index = 0;
|
||||||
|
@ -74,10 +74,10 @@ public class WndJournal extends WndTabbed {
|
||||||
|
|
||||||
resize(width, height);
|
resize(width, height);
|
||||||
|
|
||||||
notes = new Notes();
|
notesTab = new NotesTab();
|
||||||
add(notes);
|
add(notesTab);
|
||||||
notes.setRect(0, 0, width, height);
|
notesTab.setRect(0, 0, width, height);
|
||||||
notes.updateList();
|
notesTab.updateList();
|
||||||
|
|
||||||
catalogTab = new CatalogTab();
|
catalogTab = new CatalogTab();
|
||||||
add(catalogTab);
|
add(catalogTab);
|
||||||
|
@ -94,7 +94,7 @@ public class WndJournal extends WndTabbed {
|
||||||
new LabeledTab( "Notes" ) {
|
new LabeledTab( "Notes" ) {
|
||||||
protected void select( boolean value ) {
|
protected void select( boolean value ) {
|
||||||
super.select( value );
|
super.select( value );
|
||||||
notes.active = notes.visible = value;
|
notesTab.active = notesTab.visible = value;
|
||||||
if (value) last_index = 1;
|
if (value) last_index = 1;
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
@ -181,11 +181,11 @@ public class WndJournal extends WndTabbed {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private static class Notes extends Component {
|
private static class NotesTab extends Component {
|
||||||
|
|
||||||
private ScrollPane list;
|
private ScrollPane list;
|
||||||
|
|
||||||
public Notes(){
|
public NotesTab(){
|
||||||
list = new ScrollPane( new Component() );
|
list = new ScrollPane( new Component() );
|
||||||
add( list );
|
add( list );
|
||||||
}
|
}
|
||||||
|
@ -199,7 +199,7 @@ public class WndJournal extends WndTabbed {
|
||||||
private void updateList(){
|
private void updateList(){
|
||||||
Component content = list.content();
|
Component content = list.content();
|
||||||
|
|
||||||
Collections.sort( Journal.records );
|
Collections.sort( Notes.records );
|
||||||
|
|
||||||
float pos = 0;
|
float pos = 0;
|
||||||
|
|
||||||
|
@ -237,8 +237,8 @@ public class WndJournal extends WndTabbed {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//Journal entries
|
//Notes entries
|
||||||
for (Journal.Record rec : Journal.records) {
|
for (Notes.Record rec : Notes.records) {
|
||||||
ListItem item = new ListItem( Icons.get(Icons.DEPTH), rec.feature.desc(), rec.depth );
|
ListItem item = new ListItem( Icons.get(Icons.DEPTH), rec.feature.desc(), rec.depth );
|
||||||
item.setRect( 0, pos, width(), ITEM_HEIGHT );
|
item.setRect( 0, pos, width(), ITEM_HEIGHT );
|
||||||
content.add( item );
|
content.add( item );
|
||||||
|
|
Loading…
Reference in New Issue
Block a user