WantsToApproach, WantsToFlee (functionality NYI)
This commit is contained in:
parent
9a9876349b
commit
bb8cf69b86
3 changed files with 16 additions and 0 deletions
|
|
@ -373,6 +373,16 @@ pub struct WantsToUseItem {
|
|||
pub target: Option<rltk::Point>,
|
||||
}
|
||||
|
||||
#[derive(Component, Debug, Serialize, Deserialize, Clone)]
|
||||
pub struct WantsToApproach {
|
||||
pub idx: i32,
|
||||
}
|
||||
|
||||
#[derive(Component, Debug, Serialize, Deserialize, Clone)]
|
||||
pub struct WantsToFlee {
|
||||
pub indices: Vec<usize>, // Dijkstra
|
||||
}
|
||||
|
||||
#[derive(Component, Debug, Serialize, Deserialize, Clone)]
|
||||
pub struct Consumable {}
|
||||
|
||||
|
|
|
|||
|
|
@ -560,6 +560,8 @@ fn main() -> rltk::BError {
|
|||
gs.ecs.register::<Confusion>();
|
||||
gs.ecs.register::<MagicMapper>();
|
||||
gs.ecs.register::<InBackpack>();
|
||||
gs.ecs.register::<WantsToApproach>();
|
||||
gs.ecs.register::<WantsToFlee>();
|
||||
gs.ecs.register::<WantsToPickupItem>();
|
||||
gs.ecs.register::<WantsToDropItem>();
|
||||
gs.ecs.register::<WantsToRemoveItem>();
|
||||
|
|
|
|||
|
|
@ -106,7 +106,9 @@ pub fn save_game(ecs: &mut World) {
|
|||
Telepath,
|
||||
Viewshed,
|
||||
Wand,
|
||||
WantsToApproach,
|
||||
WantsToDropItem,
|
||||
WantsToFlee,
|
||||
WantsToMelee,
|
||||
WantsToPickupItem,
|
||||
WantsToRemoveItem,
|
||||
|
|
@ -222,7 +224,9 @@ pub fn load_game(ecs: &mut World) {
|
|||
Telepath,
|
||||
Viewshed,
|
||||
Wand,
|
||||
WantsToApproach,
|
||||
WantsToDropItem,
|
||||
WantsToFlee,
|
||||
WantsToMelee,
|
||||
WantsToPickupItem,
|
||||
WantsToRemoveItem,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue