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){
|
||||
turnsToCost -= time;
|
||||
|
||||
while (turnsToCost < 0f){
|
||||
//use 1/1,000 to account for rounding errors
|
||||
while (turnsToCost < -0.001f){
|
||||
turnsToCost += 2f;
|
||||
charge --;
|
||||
}
|
||||
|
|
|
@ -99,8 +99,9 @@ public class Swiftthistle extends Plant {
|
|||
|
||||
public void processTime(float time){
|
||||
left -= time;
|
||||
|
||||
if (left <= 0){
|
||||
|
||||
//use 1/1,000 to account for rounding errors
|
||||
while (left < -0.001f){
|
||||
detach();
|
||||
}
|
||||
|
||||
|
|
|
@ -171,11 +171,11 @@ public class WndTradeItem extends WndInfoItem {
|
|||
return;
|
||||
}
|
||||
item.detachAll( hero.belongings.backpack );
|
||||
|
||||
new Gold( item.value() ).doPickUp( hero );
|
||||
|
||||
|
||||
//selling items in the sell interface doesn't spend time
|
||||
hero.spend(-hero.cooldown());
|
||||
|
||||
new Gold( item.value() ).doPickUp( hero );
|
||||
}
|
||||
|
||||
private void sellOne( Item item ) {
|
||||
|
@ -187,11 +187,11 @@ public class WndTradeItem extends WndInfoItem {
|
|||
Hero hero = Dungeon.hero;
|
||||
|
||||
item = item.detach( hero.belongings.backpack );
|
||||
|
||||
new Gold( item.value() ).doPickUp( hero );
|
||||
|
||||
|
||||
//selling items in the sell interface doesn't spend time
|
||||
hero.spend(-hero.cooldown());
|
||||
|
||||
new Gold( item.value() ).doPickUp( hero );
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user