mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
Extended what states inventory manipulations touching the loadout could affect.
This commit is contained in:
parent
8eebcdfcd2
commit
9f2255a5de
@ -1,6 +1,6 @@
|
||||
use super::utils::*;
|
||||
use crate::{
|
||||
comp::{CharacterState, StateUpdate},
|
||||
comp::{CharacterState, InventoryManip, StateUpdate},
|
||||
states::behavior::{CharacterBehavior, JoinData},
|
||||
};
|
||||
use serde::{Deserialize, Serialize};
|
||||
@ -41,4 +41,10 @@ impl CharacterBehavior for Data {
|
||||
update.character = CharacterState::Idle;
|
||||
update
|
||||
}
|
||||
|
||||
fn modify_loadout(&self, data: &JoinData, inv_manip: InventoryManip) -> StateUpdate {
|
||||
let mut update = StateUpdate::from(data);
|
||||
handle_modify_loadout(&mut update, inv_manip);
|
||||
update
|
||||
}
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
use super::utils::*;
|
||||
use crate::{
|
||||
comp::{slot::EquipSlot, CharacterState, EnergySource, StateUpdate},
|
||||
comp::{slot::EquipSlot, CharacterState, EnergySource, InventoryManip, StateUpdate},
|
||||
states::behavior::{CharacterBehavior, JoinData},
|
||||
};
|
||||
|
||||
@ -68,4 +68,10 @@ impl CharacterBehavior for Data {
|
||||
update.character = CharacterState::Idle;
|
||||
update
|
||||
}
|
||||
|
||||
fn modify_loadout(&self, data: &JoinData, inv_manip: InventoryManip) -> StateUpdate {
|
||||
let mut update = StateUpdate::from(data);
|
||||
handle_modify_loadout(&mut update, inv_manip);
|
||||
update
|
||||
}
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
use super::utils::*;
|
||||
use crate::{
|
||||
comp::{CharacterState, StateUpdate},
|
||||
comp::{CharacterState, InventoryManip, StateUpdate},
|
||||
states::behavior::{CharacterBehavior, JoinData},
|
||||
};
|
||||
use serde::{Deserialize, Serialize};
|
||||
@ -41,4 +41,10 @@ impl CharacterBehavior for Data {
|
||||
update.character = CharacterState::Idle;
|
||||
update
|
||||
}
|
||||
|
||||
fn modify_loadout(&self, data: &JoinData, inv_manip: InventoryManip) -> StateUpdate {
|
||||
let mut update = StateUpdate::from(data);
|
||||
handle_modify_loadout(&mut update, inv_manip);
|
||||
update
|
||||
}
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
use super::utils::*;
|
||||
use crate::{
|
||||
comp::{CharacterState, StateUpdate},
|
||||
comp::{CharacterState, InventoryManip, StateUpdate},
|
||||
states::behavior::{CharacterBehavior, JoinData},
|
||||
};
|
||||
|
||||
@ -59,4 +59,10 @@ impl CharacterBehavior for Data {
|
||||
update.character = CharacterState::Idle;
|
||||
update
|
||||
}
|
||||
|
||||
fn modify_loadout(&self, data: &JoinData, inv_manip: InventoryManip) -> StateUpdate {
|
||||
let mut update = StateUpdate::from(data);
|
||||
handle_modify_loadout(&mut update, inv_manip);
|
||||
update
|
||||
}
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
use super::utils::*;
|
||||
use crate::{
|
||||
comp::{CharacterState, StateUpdate},
|
||||
comp::{CharacterState, InventoryManip, StateUpdate},
|
||||
states::behavior::{CharacterBehavior, JoinData},
|
||||
};
|
||||
use serde::{Deserialize, Serialize};
|
||||
@ -46,4 +46,10 @@ impl CharacterBehavior for Data {
|
||||
update.character = CharacterState::Idle;
|
||||
update
|
||||
}
|
||||
|
||||
fn modify_loadout(&self, data: &JoinData, inv_manip: InventoryManip) -> StateUpdate {
|
||||
let mut update = StateUpdate::from(data);
|
||||
handle_modify_loadout(&mut update, inv_manip);
|
||||
update
|
||||
}
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
use super::utils::*;
|
||||
use crate::{
|
||||
comp::{CharacterState, StateUpdate},
|
||||
comp::{CharacterState, InventoryManip, StateUpdate},
|
||||
states::behavior::{CharacterBehavior, JoinData},
|
||||
};
|
||||
|
||||
@ -56,4 +56,10 @@ impl CharacterBehavior for Data {
|
||||
attempt_swap_loadout(data, &mut update);
|
||||
update
|
||||
}
|
||||
|
||||
fn modify_loadout(&self, data: &JoinData, inv_manip: InventoryManip) -> StateUpdate {
|
||||
let mut update = StateUpdate::from(data);
|
||||
handle_modify_loadout(&mut update, inv_manip);
|
||||
update
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user