merging 1.7.5 source: items/rings changes
This commit is contained in:
parent
6387b697a9
commit
c1b262a614
|
@ -35,6 +35,8 @@ import com.watabou.utils.Random;
|
||||||
|
|
||||||
public class Ring extends KindofMisc {
|
public class Ring extends KindofMisc {
|
||||||
|
|
||||||
|
private static final int TICKS_TO_KNOW = 200;
|
||||||
|
|
||||||
private static final float TIME_TO_EQUIP = 1f;
|
private static final float TIME_TO_EQUIP = 1f;
|
||||||
|
|
||||||
private static final String TXT_IDENTIFY =
|
private static final String TXT_IDENTIFY =
|
||||||
|
@ -75,7 +77,7 @@ public class Ring extends KindofMisc {
|
||||||
|
|
||||||
private String gem;
|
private String gem;
|
||||||
|
|
||||||
private int ticksToKnow = 200;
|
private int ticksToKnow = TICKS_TO_KNOW;
|
||||||
|
|
||||||
@SuppressWarnings("unchecked")
|
@SuppressWarnings("unchecked")
|
||||||
public static void initGems() {
|
public static void initGems() {
|
||||||
|
@ -284,6 +286,22 @@ public class Ring extends KindofMisc {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private static final String UNFAMILIRIARITY = "unfamiliarity";
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void storeInBundle( Bundle bundle ) {
|
||||||
|
super.storeInBundle( bundle );
|
||||||
|
bundle.put( UNFAMILIRIARITY, ticksToKnow );
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void restoreFromBundle( Bundle bundle ) {
|
||||||
|
super.restoreFromBundle( bundle );
|
||||||
|
if ((ticksToKnow = bundle.getInt( UNFAMILIRIARITY )) == 0) {
|
||||||
|
ticksToKnow = TICKS_TO_KNOW;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public class RingBuff extends Buff {
|
public class RingBuff extends Buff {
|
||||||
|
|
||||||
private static final String TXT_KNOWN = "This is a %s";
|
private static final String TXT_KNOWN = "This is a %s";
|
||||||
|
|
Loading…
Reference in New Issue
Block a user