static keys - items in inventory will save their assigned key
precursor to cleaning up/modularising inventory display, instead of needing to iterate through every item held to find unique copies, we can just check if the button pressed corresponds to any entity's Key {} index
This commit is contained in:
parent
a7b4f621fb
commit
d11971126c
19 changed files with 445 additions and 122 deletions
|
|
@ -468,9 +468,20 @@ pub struct IdentifiedItem {
|
|||
pub name: String,
|
||||
}
|
||||
|
||||
#[derive(Component, Debug, Serialize, Deserialize, Clone)]
|
||||
pub struct Stackable {}
|
||||
|
||||
#[derive(Component, Debug, Serialize, Deserialize, Clone)]
|
||||
pub struct EquipmentChanged {}
|
||||
|
||||
#[derive(Component, Debug, Serialize, Deserialize, Clone)]
|
||||
pub struct WantsToRemoveKey {}
|
||||
|
||||
#[derive(Component, Debug, Serialize, Deserialize, Clone)]
|
||||
pub struct Key {
|
||||
pub idx: usize,
|
||||
}
|
||||
|
||||
#[derive(PartialEq, Copy, Clone, Serialize, Deserialize)]
|
||||
pub enum BurdenLevel {
|
||||
Burdened,
|
||||
|
|
@ -654,6 +665,9 @@ pub struct InBackpack {
|
|||
pub owner: Entity,
|
||||
}
|
||||
|
||||
#[derive(Component, Serialize, Deserialize, Clone)]
|
||||
pub struct WantsToAssignKey {}
|
||||
|
||||
#[derive(Component, Debug, ConvertSaveload)]
|
||||
pub struct WantsToPickupItem {
|
||||
pub collected_by: Entity,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue