mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
Rename activate_inventory_slot to use_inventory_slot
This commit is contained in:
parent
5d02d32ec6
commit
bd8e71c5aa
@ -181,9 +181,8 @@ impl Client {
|
||||
// Can't fail
|
||||
}
|
||||
|
||||
pub fn activate_inventory_slot(&mut self, x: usize) {
|
||||
self.postbox
|
||||
.send_message(ClientMsg::ActivateInventorySlot(x))
|
||||
pub fn use_inventory_slot(&mut self, x: usize) {
|
||||
self.postbox.send_message(ClientMsg::UseInventorySlot(x))
|
||||
}
|
||||
|
||||
pub fn swap_inventory_slots(&mut self, a: usize, b: usize) {
|
||||
|
@ -30,7 +30,7 @@ pub enum ClientMsg {
|
||||
vel: comp::Vel,
|
||||
ori: comp::Ori,
|
||||
},
|
||||
ActivateInventorySlot(usize),
|
||||
UseInventorySlot(usize),
|
||||
SwapInventorySlots(usize, usize),
|
||||
DropInventorySlot(usize),
|
||||
PickUp(u64),
|
||||
|
@ -712,7 +712,7 @@ impl Server {
|
||||
}
|
||||
_ => {}
|
||||
},
|
||||
ClientMsg::ActivateInventorySlot(x) => {
|
||||
ClientMsg::UseInventorySlot(x) => {
|
||||
let item = state
|
||||
.ecs()
|
||||
.write_storage::<comp::Inventory>()
|
||||
|
@ -153,7 +153,7 @@ impl<'a> Widget for Bag<'a> {
|
||||
let selected_slot = match state.selected_slot {
|
||||
Some(a) => {
|
||||
if a == i {
|
||||
event = Some(Event::HudEvent(HudEvent::ActivateInventorySlot(i)));
|
||||
event = Some(Event::HudEvent(HudEvent::UseInventorySlot(i)));
|
||||
} else {
|
||||
event = Some(Event::HudEvent(HudEvent::SwapInventorySlots(a, i)));
|
||||
}
|
||||
|
@ -162,7 +162,7 @@ pub enum Event {
|
||||
ToggleShortcutNumbers(ShortcutNumbers),
|
||||
UiScale(ScaleChange),
|
||||
CharacterSelection,
|
||||
ActivateInventorySlot(usize),
|
||||
UseInventorySlot(usize),
|
||||
SwapInventorySlots(usize, usize),
|
||||
DropInventorySlot(usize),
|
||||
Logout,
|
||||
|
@ -376,9 +376,7 @@ impl PlayState for SessionState {
|
||||
global_state.settings.graphics.max_fps = fps;
|
||||
global_state.settings.save_to_file_warn();
|
||||
}
|
||||
HudEvent::ActivateInventorySlot(x) => {
|
||||
self.client.borrow_mut().activate_inventory_slot(x)
|
||||
}
|
||||
HudEvent::UseInventorySlot(x) => self.client.borrow_mut().use_inventory_slot(x),
|
||||
HudEvent::SwapInventorySlots(a, b) => {
|
||||
self.client.borrow_mut().swap_inventory_slots(a, b)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user