v0.8.2: ui adjustments:

- questgivers now get journal entries as they are seen
- layout tweaks to news and supporter scene buttons
This commit is contained in:
Evan Debenham 2020-08-04 19:26:42 -04:00
parent defbb2ea5f
commit 0d43ef0635
5 changed files with 18 additions and 9 deletions

View File

@ -64,6 +64,9 @@ public class Blacksmith extends NPC {
@Override @Override
protected boolean act() { protected boolean act() {
throwItem(); throwItem();
if (Dungeon.level.heroFOV[pos] && !Quest.reforged){
Notes.add( Notes.Landmark.TROLL );
}
return super.act(); return super.act();
} }
@ -102,8 +105,6 @@ public class Blacksmith extends NPC {
} }
}); });
Notes.add( Notes.Landmark.TROLL );
} else if (!Quest.completed) { } else if (!Quest.completed) {
if (Quest.alternative) { if (Quest.alternative) {

View File

@ -66,8 +66,12 @@ public class Ghost extends NPC {
@Override @Override
protected boolean act() { protected boolean act() {
if (Quest.processed()) if (Quest.processed()) {
target = Dungeon.hero.pos; target = Dungeon.hero.pos;
}
if (Dungeon.level.heroFOV[pos] && !Quest.completed()){
Notes.add( Notes.Landmark.GHOST );
}
return super.act(); return super.act();
} }
@ -174,7 +178,6 @@ public class Ghost extends NPC {
if (questBoss.pos != -1) { if (questBoss.pos != -1) {
GameScene.add(questBoss); GameScene.add(questBoss);
Quest.given = true; Quest.given = true;
Notes.add( Notes.Landmark.GHOST );
Game.runOnRenderThread(new Callback() { Game.runOnRenderThread(new Callback() {
@Override @Override
public void call() { public void call() {

View File

@ -60,6 +60,7 @@ public class Imp extends NPC {
if (!seenBefore) { if (!seenBefore) {
yell( Messages.get(this, "hey", Dungeon.hero.name() ) ); yell( Messages.get(this, "hey", Dungeon.hero.name() ) );
} }
Notes.add( Notes.Landmark.IMP );
seenBefore = true; seenBefore = true;
} else { } else {
seenBefore = false; seenBefore = false;
@ -117,8 +118,6 @@ public class Imp extends NPC {
tell( Quest.alternative ? Messages.get(this, "monks_1") : Messages.get(this, "golems_1") ); tell( Quest.alternative ? Messages.get(this, "monks_1") : Messages.get(this, "golems_1") );
Quest.given = true; Quest.given = true;
Quest.completed = false; Quest.completed = false;
Notes.add( Notes.Landmark.IMP );
} }
return true; return true;

View File

@ -61,6 +61,9 @@ public class Wandmaker extends NPC {
@Override @Override
protected boolean act() { protected boolean act() {
throwItem(); throwItem();
if (Dungeon.level.heroFOV[pos] && Quest.wand1 != null){
Notes.add( Notes.Landmark.WANDMAKER );
}
return super.act(); return super.act();
} }
@ -184,7 +187,6 @@ public class Wandmaker extends NPC {
} }
}); });
Notes.add( Notes.Landmark.WANDMAKER );
Quest.given = true; Quest.given = true;
} }

View File

@ -276,13 +276,17 @@ public class NewsScene extends PixelScene {
protected void layout() { protected void layout() {
text.maxWidth( (int)(width - icon.width() - bg.marginHor() - 2)); text.maxWidth( (int)(width - icon.width() - bg.marginHor() - 2));
super.layout();
icon.x = x + bg.marginLeft() + (16-icon.width())/2f;
PixelScene.align(icon);
text.setPos(x + bg.marginLeft() + 18, text.top());
if (date != null) { if (date != null) {
date.x = x + width - bg.marginRight() - date.width() + 2; date.x = x + width - bg.marginRight() - date.width() + 2;
date.y = y + height - bg.marginBottom() - date.height() + 3.5f; date.y = y + height - bg.marginBottom() - date.height() + 3.5f;
align(date); align(date);
} }
super.layout();
} }
@Override @Override