basic equippables
This commit is contained in:
parent
595ec61332
commit
8d04c40389
8 changed files with 330 additions and 36 deletions
|
|
@ -84,6 +84,33 @@ impl SufferDamage {
|
|||
#[derive(Component, Debug, Serialize, Deserialize, Clone)]
|
||||
pub struct Item {}
|
||||
|
||||
#[derive(PartialEq, Copy, Clone, Serialize, Deserialize)]
|
||||
pub enum EquipmentSlot {
|
||||
Melee,
|
||||
Shield,
|
||||
}
|
||||
|
||||
#[derive(Component, ConvertSaveload, Clone)]
|
||||
pub struct MeleePowerBonus {
|
||||
pub amount: i32,
|
||||
}
|
||||
|
||||
#[derive(Component, ConvertSaveload, Clone)]
|
||||
pub struct DefenceBonus {
|
||||
pub amount: i32,
|
||||
}
|
||||
|
||||
#[derive(Component, Serialize, Deserialize, Clone)]
|
||||
pub struct Equippable {
|
||||
pub slot: EquipmentSlot,
|
||||
}
|
||||
|
||||
#[derive(Component, ConvertSaveload, Clone)]
|
||||
pub struct Equipped {
|
||||
pub owner: Entity,
|
||||
pub slot: EquipmentSlot,
|
||||
}
|
||||
|
||||
#[derive(Component, Debug, Serialize, Deserialize, Clone)]
|
||||
pub struct Cursed {}
|
||||
|
||||
|
|
@ -131,6 +158,11 @@ pub struct WantsToDropItem {
|
|||
pub item: Entity,
|
||||
}
|
||||
|
||||
#[derive(Component, Debug, ConvertSaveload)]
|
||||
pub struct WantsToRemoveItem {
|
||||
pub item: Entity,
|
||||
}
|
||||
|
||||
#[derive(Component, Debug, ConvertSaveload)]
|
||||
pub struct WantsToUseItem {
|
||||
pub item: Entity,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue