mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
Merge branch 'sam/fix-equip-slots' into 'master'
Fix Equip Slots See merge request veloren/veloren!2331
This commit is contained in:
commit
7488d8692b
@ -172,8 +172,8 @@ impl Loadout {
|
||||
assert_eq!(self.swap(equip_slot_a, item_b), None);
|
||||
|
||||
// Check if items are valid in their new positions
|
||||
if !self.slot_can_hold(equip_slot_a, self.equipped(equip_slot_b).map(|x| x.kind()))
|
||||
|| !self.slot_can_hold(equip_slot_b, self.equipped(equip_slot_a).map(|x| x.kind()))
|
||||
if !self.slot_can_hold(equip_slot_a, self.equipped(equip_slot_a).map(|x| x.kind()))
|
||||
|| !self.slot_can_hold(equip_slot_b, self.equipped(equip_slot_b).map(|x| x.kind()))
|
||||
{
|
||||
// If not, revert the swap
|
||||
let item_a = self.swap(equip_slot_a, None);
|
||||
|
Loading…
Reference in New Issue
Block a user