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;
|
levelKnown = true;
|
||||||
cursedKnown = true;
|
cursedKnown = true;
|
||||||
|
|
||||||
if (Dungeon.hero.isAlive()) {
|
if (Dungeon.hero != null && Dungeon.hero.isAlive()) {
|
||||||
Catalog.setSeen(getClass());
|
Catalog.setSeen(getClass());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -126,8 +126,10 @@ public class Potion extends Item {
|
||||||
@Override
|
@Override
|
||||||
public void reset(){
|
public void reset(){
|
||||||
super.reset();
|
super.reset();
|
||||||
image = handler.image( this );
|
if (handler != null) {
|
||||||
color = handler.label( this );
|
image = handler.image(this);
|
||||||
|
color = handler.label(this);
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -109,8 +109,10 @@ public class Ring extends KindofMisc {
|
||||||
|
|
||||||
public void reset() {
|
public void reset() {
|
||||||
super.reset();
|
super.reset();
|
||||||
image = handler.image( this );
|
if (handler != null){
|
||||||
gem = handler.label( this );
|
image = handler.image(this);
|
||||||
|
gem = handler.label(this);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void activate( Char ch ) {
|
public void activate( Char ch ) {
|
||||||
|
|
|
@ -115,8 +115,10 @@ public abstract class Scroll extends Item {
|
||||||
@Override
|
@Override
|
||||||
public void reset(){
|
public void reset(){
|
||||||
super.reset();
|
super.reset();
|
||||||
image = handler.image( this );
|
if (handler != null) {
|
||||||
rune = handler.label( this );
|
image = handler.image(this);
|
||||||
|
rune = handler.label(this);
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -31,7 +31,7 @@ import com.watabou.noosa.ui.Component;
|
||||||
public class WndTitledMessage extends Window {
|
public class WndTitledMessage extends Window {
|
||||||
|
|
||||||
protected static final int WIDTH_P = 120;
|
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;
|
protected static final int GAP = 2;
|
||||||
|
|
||||||
public WndTitledMessage( Image icon, String title, String message ) {
|
public WndTitledMessage( Image icon, String title, String message ) {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user