diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/Bones.java b/src/com/shatteredpixel/shatteredpixeldungeon/Bones.java index d3380fa9d..fe7654735 100644 --- a/src/com/shatteredpixel/shatteredpixeldungeon/Bones.java +++ b/src/com/shatteredpixel/shatteredpixeldungeon/Bones.java @@ -26,7 +26,6 @@ import com.shatteredpixel.shatteredpixeldungeon.items.Gold; import com.shatteredpixel.shatteredpixeldungeon.items.Item; import com.shatteredpixel.shatteredpixeldungeon.items.artifacts.Artifact; import com.shatteredpixel.shatteredpixeldungeon.items.weapon.missiles.MissileWeapon; -import com.shatteredpixel.shatteredpixeldungeon.ui.QuickSlotButton; import com.watabou.noosa.Game; import com.watabou.utils.Bundle; import com.watabou.utils.Random; @@ -43,7 +42,7 @@ public class Bones { private static final String LEVEL = "level"; private static final String ITEM = "item"; - + private static int depth = -1; private static Item item; @@ -182,7 +181,7 @@ public class Bones { } } - item.syncVisuals(); + item.sync(); return item; } else { diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/items/Item.java b/src/com/shatteredpixel/shatteredpixeldungeon/items/Item.java index 3c3026e1a..26019f1b1 100644 --- a/src/com/shatteredpixel/shatteredpixeldungeon/items/Item.java +++ b/src/com/shatteredpixel/shatteredpixeldungeon/items/Item.java @@ -118,8 +118,10 @@ public class Item implements Bundlable { Dungeon.level.drop( detachAll( hero.belongings.backpack ), hero.pos ).sprite.drop( hero.pos ); } - public void syncVisuals(){ - //do nothing by default, as most items need no visual syncing. + //'syncs' an item to be consistent between two separate game instances. + public void sync(){ + //resets the name incase the language has changed. + name = Messages.get(this, "name"); } public void doThrow( Hero hero ) { diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/items/potions/Potion.java b/src/com/shatteredpixel/shatteredpixeldungeon/items/potions/Potion.java index 6b2dce687..ce69de13d 100644 --- a/src/com/shatteredpixel/shatteredpixeldungeon/items/potions/Potion.java +++ b/src/com/shatteredpixel/shatteredpixeldungeon/items/potions/Potion.java @@ -112,11 +112,12 @@ public class Potion extends Item { public Potion() { super(); - syncVisuals(); + sync(); } @Override - public void syncVisuals(){ + public void sync(){ + super.sync(); image = handler.image( this ); color = handler.label( this ); }; diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/items/rings/Ring.java b/src/com/shatteredpixel/shatteredpixeldungeon/items/rings/Ring.java index 97aaac007..711caab2a 100644 --- a/src/com/shatteredpixel/shatteredpixeldungeon/items/rings/Ring.java +++ b/src/com/shatteredpixel/shatteredpixeldungeon/items/rings/Ring.java @@ -99,10 +99,11 @@ public class Ring extends KindofMisc { public Ring() { super(); - syncVisuals(); + sync(); } - public void syncVisuals() { + public void sync() { + super.sync(); image = handler.image( this ); gem = handler.label( this ); } diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/items/scrolls/Scroll.java b/src/com/shatteredpixel/shatteredpixeldungeon/items/scrolls/Scroll.java index 77e15928d..dc415b221 100644 --- a/src/com/shatteredpixel/shatteredpixeldungeon/items/scrolls/Scroll.java +++ b/src/com/shatteredpixel/shatteredpixeldungeon/items/scrolls/Scroll.java @@ -100,11 +100,12 @@ public abstract class Scroll extends Item { public Scroll() { super(); - syncVisuals(); + sync(); } @Override - public void syncVisuals(){ + public void sync(){ + super.sync(); image = handler.image( this ); rune = handler.label( this ); };