EncumbranceSystem {}
This commit is contained in:
parent
0ef3a51e56
commit
0344f87da8
14 changed files with 282 additions and 30 deletions
|
|
@ -6,6 +6,8 @@ pub struct Item {
|
|||
pub id: String,
|
||||
pub name: Name,
|
||||
pub renderable: Option<Renderable>,
|
||||
pub weight: Option<f32>,
|
||||
pub value: Option<f32>,
|
||||
pub flags: Option<Vec<String>>,
|
||||
pub effects: Option<HashMap<String, String>>,
|
||||
}
|
||||
|
|
|
|||
|
|
@ -114,7 +114,7 @@ pub fn spawn_named_item(raws: &RawMaster, ecs: &mut World, key: &str, pos: Spawn
|
|||
let mut eb = ecs.create_entity().marked::<SimpleMarker<SerializeMe>>();
|
||||
|
||||
eb = eb.with(Name { name: item_template.name.name.clone(), plural: item_template.name.plural.clone() });
|
||||
eb = eb.with(Item {});
|
||||
eb = eb.with(Item { weight: item_template.weight.unwrap_or(0.0), value: item_template.value.unwrap_or(0.0) });
|
||||
eb = spawn_position(pos, eb, key, raws);
|
||||
|
||||
if let Some(renderable) = &item_template.renderable {
|
||||
|
|
@ -312,8 +312,10 @@ pub fn spawn_named_mob(
|
|||
bac: mob_bac,
|
||||
hit_points: Pool { current: mob_hp, max: mob_hp },
|
||||
mana: Pool { current: mob_mana, max: mob_mana },
|
||||
weight: 0.0,
|
||||
};
|
||||
eb = eb.with(pools);
|
||||
eb = eb.with(EquipmentChanged {});
|
||||
|
||||
let mut skills = Skills { skills: HashMap::new() };
|
||||
skills.skills.insert(Skill::Melee, 0);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue