v0.9.1: fixed various minor errors relating to time freeze interactions
This commit is contained in:
parent
989c524e33
commit
dd9e25308b
|
@ -309,7 +309,8 @@ public class TimekeepersHourglass extends Artifact {
|
||||||
public void processTime(float time){
|
public void processTime(float time){
|
||||||
turnsToCost -= time;
|
turnsToCost -= time;
|
||||||
|
|
||||||
while (turnsToCost < 0f){
|
//use 1/1,000 to account for rounding errors
|
||||||
|
while (turnsToCost < -0.001f){
|
||||||
turnsToCost += 2f;
|
turnsToCost += 2f;
|
||||||
charge --;
|
charge --;
|
||||||
}
|
}
|
||||||
|
|
|
@ -99,8 +99,9 @@ public class Swiftthistle extends Plant {
|
||||||
|
|
||||||
public void processTime(float time){
|
public void processTime(float time){
|
||||||
left -= time;
|
left -= time;
|
||||||
|
|
||||||
if (left <= 0){
|
//use 1/1,000 to account for rounding errors
|
||||||
|
while (left < -0.001f){
|
||||||
detach();
|
detach();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -171,11 +171,11 @@ public class WndTradeItem extends WndInfoItem {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
item.detachAll( hero.belongings.backpack );
|
item.detachAll( hero.belongings.backpack );
|
||||||
|
|
||||||
new Gold( item.value() ).doPickUp( hero );
|
|
||||||
|
|
||||||
//selling items in the sell interface doesn't spend time
|
//selling items in the sell interface doesn't spend time
|
||||||
hero.spend(-hero.cooldown());
|
hero.spend(-hero.cooldown());
|
||||||
|
|
||||||
|
new Gold( item.value() ).doPickUp( hero );
|
||||||
}
|
}
|
||||||
|
|
||||||
private void sellOne( Item item ) {
|
private void sellOne( Item item ) {
|
||||||
|
@ -187,11 +187,11 @@ public class WndTradeItem extends WndInfoItem {
|
||||||
Hero hero = Dungeon.hero;
|
Hero hero = Dungeon.hero;
|
||||||
|
|
||||||
item = item.detach( hero.belongings.backpack );
|
item = item.detach( hero.belongings.backpack );
|
||||||
|
|
||||||
new Gold( item.value() ).doPickUp( hero );
|
|
||||||
|
|
||||||
//selling items in the sell interface doesn't spend time
|
//selling items in the sell interface doesn't spend time
|
||||||
hero.spend(-hero.cooldown());
|
hero.spend(-hero.cooldown());
|
||||||
|
|
||||||
|
new Gold( item.value() ).doPickUp( hero );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user