Add hunger: Reformat
This commit is contained in:
@@ -4,9 +4,14 @@ use rltk::{FontCharType, RandomNumberGenerator, RGB};
|
||||
use specs::prelude::*;
|
||||
use specs::saveload::{MarkedBuilder, SimpleMarker};
|
||||
|
||||
use crate::{AreaOfEffect, BlocksTile, CombatStats, Confusion, Consumable, DefenseBonus, EquipmentSlot, Equippable, HungerClock, HungerState, InflictsDamage, Item, MAP_WIDTH, MAX_MONSTER, MeleePowerBonus, Monster, Name, Player, Position, ProvidesFood, ProvidesHealing, Ranged, Renderable, SerializeMe, Viewshed};
|
||||
use crate::random_table::RandomTable;
|
||||
use crate::rect::Rect;
|
||||
use crate::{
|
||||
AreaOfEffect, BlocksTile, CombatStats, Confusion, Consumable, DefenseBonus, EquipmentSlot,
|
||||
Equippable, HungerClock, HungerState, InflictsDamage, Item, MeleePowerBonus, Monster, Name,
|
||||
Player, Position, ProvidesFood, ProvidesHealing, Ranged, Renderable, SerializeMe, Viewshed,
|
||||
MAP_WIDTH, MAX_MONSTER,
|
||||
};
|
||||
|
||||
pub fn player(ecs: &mut World, player_x: i32, player_y: i32) -> Entity {
|
||||
ecs.create_entity()
|
||||
@@ -400,7 +405,6 @@ fn sabatons(ecs: &mut World, x: i32, y: i32) {
|
||||
.build();
|
||||
}
|
||||
|
||||
|
||||
fn rations(ecs: &mut World, x: i32, y: i32) {
|
||||
ecs.create_entity()
|
||||
.with(Position { x, y })
|
||||
@@ -414,8 +418,8 @@ fn rations(ecs: &mut World, x: i32, y: i32) {
|
||||
.with(Name {
|
||||
name: "Rations".to_string(),
|
||||
})
|
||||
.with(Consumable{})
|
||||
.with(ProvidesFood{})
|
||||
.with(Consumable {})
|
||||
.with(ProvidesFood {})
|
||||
.marked::<SimpleMarker<SerializeMe>>()
|
||||
.build();
|
||||
}
|
||||
|
Reference in New Issue
Block a user