Toggle_lantern after dropping a Lantern slot item

This commit is contained in:
Joey Maher 2020-06-05 21:37:15 -05:00
parent 521688f1bb
commit 25e74ee6e2
2 changed files with 10 additions and 1 deletions

View File

@ -26,6 +26,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Improved animations by adding orientation variation
- new tail bone for quad_small body
- slim the game size through lossless asset optimization
- Lanterns now stop glowing if you throw a lit one out of your inventory
### Removed

View File

@ -688,7 +688,15 @@ impl PlayState for SessionState {
},
HudEvent::UseSlot(x) => self.client.borrow_mut().use_slot(x),
HudEvent::SwapSlots(a, b) => self.client.borrow_mut().swap_slots(a, b),
HudEvent::DropSlot(x) => self.client.borrow_mut().drop_slot(x),
HudEvent::DropSlot(x) => {
let mut client = self.client.borrow_mut();
client.drop_slot(x);
if let comp::slot::Slot::Equip(equip_slot) = x {
if let comp::slot::EquipSlot::Lantern = equip_slot {
client.toggle_lantern();
}
}
},
HudEvent::Ability3(state) => self.inputs.ability3.set_state(state),
HudEvent::ChangeFOV(new_fov) => {
global_state.settings.graphics.fov = new_fov;