v0.8.0: added functionality for forced newlines in game log
This commit is contained in:
parent
01946d4c66
commit
70d6476fd2
|
@ -347,7 +347,6 @@ public class DwarfKing extends Mob {
|
|||
yell(Messages.get(this, "notice"));
|
||||
for (Char ch : Actor.chars()){
|
||||
if (ch instanceof DriedRose.GhostHero){
|
||||
GLog.n("\n");
|
||||
((DriedRose.GhostHero) ch).sayBoss();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -267,7 +267,6 @@ public class Goo extends Mob {
|
|||
yell(Messages.get(this, "notice"));
|
||||
for (Char ch : Actor.chars()){
|
||||
if (ch instanceof DriedRose.GhostHero){
|
||||
GLog.n("\n");
|
||||
((DriedRose.GhostHero) ch).sayBoss();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -232,7 +232,6 @@ public class King extends Mob {
|
|||
yell(Messages.get(this, "notice"));
|
||||
for (Char ch : Actor.chars()){
|
||||
if (ch instanceof DriedRose.GhostHero){
|
||||
GLog.n("\n");
|
||||
((DriedRose.GhostHero) ch).sayBoss();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -720,6 +720,7 @@ public abstract class Mob extends Char {
|
|||
}
|
||||
|
||||
public void yell( String str ) {
|
||||
GLog.newLine();
|
||||
GLog.n( "%s: \"%s\" ", Messages.titleCase(name()), str );
|
||||
}
|
||||
|
||||
|
|
|
@ -321,7 +321,6 @@ public class NewDM300 extends Mob {
|
|||
yell(Messages.get(this, "notice"));
|
||||
for (Char ch : Actor.chars()){
|
||||
if (ch instanceof DriedRose.GhostHero){
|
||||
GLog.n("\n");
|
||||
((DriedRose.GhostHero) ch).sayBoss();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -305,7 +305,6 @@ public class NewTengu extends Mob {
|
|||
yell(Messages.get(this, "notice_gotcha", Dungeon.hero.name()));
|
||||
for (Char ch : Actor.chars()){
|
||||
if (ch instanceof DriedRose.GhostHero){
|
||||
GLog.n("\n");
|
||||
((DriedRose.GhostHero) ch).sayBoss();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -174,7 +174,6 @@ public class OldDM300 extends Mob {
|
|||
yell(Messages.get(this, "notice"));
|
||||
for (Char ch : Actor.chars()){
|
||||
if (ch instanceof DriedRose.GhostHero){
|
||||
GLog.n("\n");
|
||||
((DriedRose.GhostHero) ch).sayBoss();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -251,7 +251,6 @@ public class OldTengu extends Mob {
|
|||
yell(Messages.get(this, "notice_mine", Dungeon.hero.name()));
|
||||
for (Char ch : Actor.chars()){
|
||||
if (ch instanceof DriedRose.GhostHero){
|
||||
GLog.n("\n");
|
||||
((DriedRose.GhostHero) ch).sayBoss();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -181,7 +181,6 @@ public class Yog extends Mob {
|
|||
yell(Messages.get(this, "notice"));
|
||||
for (Char ch : Actor.chars()){
|
||||
if (ch instanceof DriedRose.GhostHero){
|
||||
GLog.n("\n");
|
||||
((DriedRose.GhostHero) ch).sayBoss();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -369,7 +369,6 @@ public class YogDzewa extends Mob {
|
|||
yell(Messages.get(this, "notice"));
|
||||
for (Char ch : Actor.chars()){
|
||||
if (ch instanceof DriedRose.GhostHero){
|
||||
GLog.n("\n");
|
||||
((DriedRose.GhostHero) ch).sayBoss();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -57,6 +57,11 @@ public class GameLog extends Component implements Signal.Listener<String> {
|
|||
clear();
|
||||
recreateLines();
|
||||
}
|
||||
|
||||
if (text.equals( GLog.NEW_LINE )){
|
||||
lastEntry = null;
|
||||
continue;
|
||||
}
|
||||
|
||||
int color = CharSprite.DEFAULT;
|
||||
if (text.startsWith( GLog.POSITIVE )) {
|
||||
|
|
|
@ -33,8 +33,14 @@ public class GLog {
|
|||
public static final String NEGATIVE = "-- ";
|
||||
public static final String WARNING = "** ";
|
||||
public static final String HIGHLIGHT = "@@ ";
|
||||
|
||||
public static final String NEW_LINE = "\n";
|
||||
|
||||
public static Signal<String> update = new Signal<>();
|
||||
|
||||
public static void newLine(){
|
||||
update.dispatch( NEW_LINE );
|
||||
}
|
||||
|
||||
public static void i( String text, Object... args ) {
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user