mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
Expand on documentation
This commit is contained in:
parent
aabf68eddb
commit
38af64df51
@ -130,7 +130,8 @@ fn loadout_replace(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Insert an item into a loadout
|
/// Insert an item into a loadout. If the specified slot is already occupied
|
||||||
|
/// the old item is returned.
|
||||||
#[must_use]
|
#[must_use]
|
||||||
fn loadout_insert(
|
fn loadout_insert(
|
||||||
equip_slot: EquipSlot,
|
equip_slot: EquipSlot,
|
||||||
@ -201,7 +202,8 @@ fn swap_inventory_loadout(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Swap items in loadout.
|
/// Swap items in loadout. Does nothing if items are not compatible with their
|
||||||
|
/// new slots.
|
||||||
fn swap_loadout(slot_a: EquipSlot, slot_b: EquipSlot, loadout: &mut Loadout) {
|
fn swap_loadout(slot_a: EquipSlot, slot_b: EquipSlot, loadout: &mut Loadout) {
|
||||||
// Ensure that the slots are not the same
|
// Ensure that the slots are not the same
|
||||||
if slot_a == slot_b {
|
if slot_a == slot_b {
|
||||||
|
Loading…
Reference in New Issue
Block a user