v0.6.1: fixed various crashes caused by initalizing items in the changes scene
This commit is contained in:
parent
ceb6ca2668
commit
a41309ed66
|
@ -338,7 +338,7 @@ public class Item implements Bundlable {
|
|||
levelKnown = true;
|
||||
cursedKnown = true;
|
||||
|
||||
if (Dungeon.hero.isAlive()) {
|
||||
if (Dungeon.hero != null && Dungeon.hero.isAlive()) {
|
||||
Catalog.setSeen(getClass());
|
||||
}
|
||||
|
||||
|
|
|
@ -126,8 +126,10 @@ public class Potion extends Item {
|
|||
@Override
|
||||
public void reset(){
|
||||
super.reset();
|
||||
if (handler != null) {
|
||||
image = handler.image(this);
|
||||
color = handler.label(this);
|
||||
}
|
||||
};
|
||||
|
||||
@Override
|
||||
|
|
|
@ -109,9 +109,11 @@ public class Ring extends KindofMisc {
|
|||
|
||||
public void reset() {
|
||||
super.reset();
|
||||
if (handler != null){
|
||||
image = handler.image(this);
|
||||
gem = handler.label(this);
|
||||
}
|
||||
}
|
||||
|
||||
public void activate( Char ch ) {
|
||||
buff = buff();
|
||||
|
|
|
@ -115,8 +115,10 @@ public abstract class Scroll extends Item {
|
|||
@Override
|
||||
public void reset(){
|
||||
super.reset();
|
||||
if (handler != null) {
|
||||
image = handler.image(this);
|
||||
rune = handler.label(this);
|
||||
}
|
||||
};
|
||||
|
||||
@Override
|
||||
|
|
|
@ -31,7 +31,7 @@ import com.watabou.noosa.ui.Component;
|
|||
public class WndTitledMessage extends Window {
|
||||
|
||||
protected static final int WIDTH_P = 120;
|
||||
protected static final int WIDTH_L = 144;
|
||||
protected static final int WIDTH_L = 160;
|
||||
protected static final int GAP = 2;
|
||||
|
||||
public WndTitledMessage( Image icon, String title, String message ) {
|
||||
|
|
Loading…
Reference in New Issue
Block a user