Merge branch 'assets-bug-fix' into 'master'

Fixed bug in loading JSON assets

See merge request veloren/veloren!210
This commit is contained in:
Joshua Barretto 2019-06-04 12:39:46 +00:00
commit c8c07d2783
2 changed files with 2 additions and 2 deletions

View File

@ -109,7 +109,7 @@ impl Asset for DotVoxData {
impl Asset for Value {
fn load(specifier: &str) -> Result<Self, Error> {
Ok(serde_json::from_reader(File::open(specifier)?).unwrap())
Ok(serde_json::from_reader(load_from_path(specifier)?).unwrap())
}
}

View File

@ -24,7 +24,7 @@ impl NpcKind {
lazy_static! {
static ref NPC_NAMES_JSON: Arc<serde_json::Value> =
assets::load_expect("assets/common/npc_names.json");
assets::load_expect("common/npc_names.json");
}
pub fn get_npc_name(npc_type: NpcKind) -> String {