diff --git a/client/src/lib.rs b/client/src/lib.rs index 2b68817639..c30c5db091 100644 --- a/client/src/lib.rs +++ b/client/src/lib.rs @@ -265,7 +265,7 @@ impl Client { let entity = state.ecs_mut().apply_entity_package(entity_package); *state.ecs_mut().write_resource() = time_of_day; - *state.ecs_mut().write_resource() = material_stats; + state.ecs_mut().insert(material_stats); state.ecs_mut().insert(ability_map); let map_size_lg = common::terrain::MapSizeLg::new(world_map.dimensions_lg) diff --git a/common/sys/src/state.rs b/common/sys/src/state.rs index cdd3036b1e..32c6c20327 100644 --- a/common/sys/src/state.rs +++ b/common/sys/src/state.rs @@ -197,7 +197,6 @@ impl State { ecs.insert(EventBus::::default()); ecs.insert(game_mode); ecs.insert(Vec::::new()); - ecs.insert(comp::inventory::item::MaterialStatManifest::default()); // TODO: only register on the server ecs.insert(EventBus::::default()); ecs.insert(comp::group::GroupManager::default()); diff --git a/server/src/lib.rs b/server/src/lib.rs index 1f91276b58..089133d7bd 100644 --- a/server/src/lib.rs +++ b/server/src/lib.rs @@ -183,6 +183,10 @@ impl Server { "common.abilities.weapon_ability_manifest", ); state.ecs_mut().insert(ability_map); + + let msm = comp::inventory::item::MaterialStatManifest::default(); + state.ecs_mut().insert(msm); + state .ecs_mut() .insert(CharacterLoader::new(&persistence_db_dir)?);