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:
@ -181,9 +181,8 @@ impl Client {
|
|||||||
// Can't fail
|
// Can't fail
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn activate_inventory_slot(&mut self, x: usize) {
|
pub fn use_inventory_slot(&mut self, x: usize) {
|
||||||
self.postbox
|
self.postbox.send_message(ClientMsg::UseInventorySlot(x))
|
||||||
.send_message(ClientMsg::ActivateInventorySlot(x))
|
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn swap_inventory_slots(&mut self, a: usize, b: usize) {
|
pub fn swap_inventory_slots(&mut self, a: usize, b: usize) {
|
||||||
|
@ -30,7 +30,7 @@ pub enum ClientMsg {
|
|||||||
vel: comp::Vel,
|
vel: comp::Vel,
|
||||||
ori: comp::Ori,
|
ori: comp::Ori,
|
||||||
},
|
},
|
||||||
ActivateInventorySlot(usize),
|
UseInventorySlot(usize),
|
||||||
SwapInventorySlots(usize, usize),
|
SwapInventorySlots(usize, usize),
|
||||||
DropInventorySlot(usize),
|
DropInventorySlot(usize),
|
||||||
PickUp(u64),
|
PickUp(u64),
|
||||||
|
@ -712,7 +712,7 @@ impl Server {
|
|||||||
}
|
}
|
||||||
_ => {}
|
_ => {}
|
||||||
},
|
},
|
||||||
ClientMsg::ActivateInventorySlot(x) => {
|
ClientMsg::UseInventorySlot(x) => {
|
||||||
let item = state
|
let item = state
|
||||||
.ecs()
|
.ecs()
|
||||||
.write_storage::<comp::Inventory>()
|
.write_storage::<comp::Inventory>()
|
||||||
|
@ -153,7 +153,7 @@ impl<'a> Widget for Bag<'a> {
|
|||||||
let selected_slot = match state.selected_slot {
|
let selected_slot = match state.selected_slot {
|
||||||
Some(a) => {
|
Some(a) => {
|
||||||
if a == i {
|
if a == i {
|
||||||
event = Some(Event::HudEvent(HudEvent::ActivateInventorySlot(i)));
|
event = Some(Event::HudEvent(HudEvent::UseInventorySlot(i)));
|
||||||
} else {
|
} else {
|
||||||
event = Some(Event::HudEvent(HudEvent::SwapInventorySlots(a, i)));
|
event = Some(Event::HudEvent(HudEvent::SwapInventorySlots(a, i)));
|
||||||
}
|
}
|
||||||
|
@ -162,7 +162,7 @@ pub enum Event {
|
|||||||
ToggleShortcutNumbers(ShortcutNumbers),
|
ToggleShortcutNumbers(ShortcutNumbers),
|
||||||
UiScale(ScaleChange),
|
UiScale(ScaleChange),
|
||||||
CharacterSelection,
|
CharacterSelection,
|
||||||
ActivateInventorySlot(usize),
|
UseInventorySlot(usize),
|
||||||
SwapInventorySlots(usize, usize),
|
SwapInventorySlots(usize, usize),
|
||||||
DropInventorySlot(usize),
|
DropInventorySlot(usize),
|
||||||
Logout,
|
Logout,
|
||||||
|
@ -376,9 +376,7 @@ impl PlayState for SessionState {
|
|||||||
global_state.settings.graphics.max_fps = fps;
|
global_state.settings.graphics.max_fps = fps;
|
||||||
global_state.settings.save_to_file_warn();
|
global_state.settings.save_to_file_warn();
|
||||||
}
|
}
|
||||||
HudEvent::ActivateInventorySlot(x) => {
|
HudEvent::UseInventorySlot(x) => self.client.borrow_mut().use_inventory_slot(x),
|
||||||
self.client.borrow_mut().activate_inventory_slot(x)
|
|
||||||
}
|
|
||||||
HudEvent::SwapInventorySlots(a, b) => {
|
HudEvent::SwapInventorySlots(a, b) => {
|
||||||
self.client.borrow_mut().swap_inventory_slots(a, b)
|
self.client.borrow_mut().swap_inventory_slots(a, b)
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user