Browse Source

default to high price rather than zero

pbs
jake 4 years ago
parent
commit
1e18d5729b
  1. 6
      src/ship/shops/armor.rs

6
src/ship/shops/armor.rs

@ -38,7 +38,7 @@ impl ShopItem for ShopArmor {
price += 70.0 * frame_stats.level_req as f32 * *slot as f32; price += 70.0 * frame_stats.level_req as f32 * *slot as f32;
price as usize price as usize
}) })
.unwrap_or(0)
.unwrap_or(0xFFFF)
}, },
ShopArmor::Barrier(barrier) => { ShopArmor::Barrier(barrier) => {
SHIELD_STATS.get(&barrier) SHIELD_STATS.get(&barrier)
@ -49,14 +49,14 @@ impl ShopItem for ShopArmor {
price += 70.0 * barrier_stats.level_req as f32; price += 70.0 * barrier_stats.level_req as f32;
price as usize price as usize
}) })
.unwrap_or(0)
.unwrap_or(0xFFFF)
}, },
ShopArmor::Unit(unit) => { ShopArmor::Unit(unit) => {
UNIT_STATS.get(&unit) UNIT_STATS.get(&unit)
.map(|unit_stats| { .map(|unit_stats| {
(unit_stats.stars as f32 * UNIT_MULTIPLIER) as usize (unit_stats.stars as f32 * UNIT_MULTIPLIER) as usize
}) })
.unwrap_or(0)
.unwrap_or(0xFFFF)
} }
} }
} }

Loading…
Cancel
Save