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>,
|
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)]
|
#[derive(Component, Debug, Serialize, Deserialize, Clone)]
|
||||||
pub struct Consumable {}
|
pub struct Consumable {}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -560,6 +560,8 @@ fn main() -> rltk::BError {
|
||||||
gs.ecs.register::<Confusion>();
|
gs.ecs.register::<Confusion>();
|
||||||
gs.ecs.register::<MagicMapper>();
|
gs.ecs.register::<MagicMapper>();
|
||||||
gs.ecs.register::<InBackpack>();
|
gs.ecs.register::<InBackpack>();
|
||||||
|
gs.ecs.register::<WantsToApproach>();
|
||||||
|
gs.ecs.register::<WantsToFlee>();
|
||||||
gs.ecs.register::<WantsToPickupItem>();
|
gs.ecs.register::<WantsToPickupItem>();
|
||||||
gs.ecs.register::<WantsToDropItem>();
|
gs.ecs.register::<WantsToDropItem>();
|
||||||
gs.ecs.register::<WantsToRemoveItem>();
|
gs.ecs.register::<WantsToRemoveItem>();
|
||||||
|
|
|
||||||
|
|
@ -106,7 +106,9 @@ pub fn save_game(ecs: &mut World) {
|
||||||
Telepath,
|
Telepath,
|
||||||
Viewshed,
|
Viewshed,
|
||||||
Wand,
|
Wand,
|
||||||
|
WantsToApproach,
|
||||||
WantsToDropItem,
|
WantsToDropItem,
|
||||||
|
WantsToFlee,
|
||||||
WantsToMelee,
|
WantsToMelee,
|
||||||
WantsToPickupItem,
|
WantsToPickupItem,
|
||||||
WantsToRemoveItem,
|
WantsToRemoveItem,
|
||||||
|
|
@ -222,7 +224,9 @@ pub fn load_game(ecs: &mut World) {
|
||||||
Telepath,
|
Telepath,
|
||||||
Viewshed,
|
Viewshed,
|
||||||
Wand,
|
Wand,
|
||||||
|
WantsToApproach,
|
||||||
WantsToDropItem,
|
WantsToDropItem,
|
||||||
|
WantsToFlee,
|
||||||
WantsToMelee,
|
WantsToMelee,
|
||||||
WantsToPickupItem,
|
WantsToPickupItem,
|
||||||
WantsToRemoveItem,
|
WantsToRemoveItem,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue