mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
Fixed bug in loading JSON assets
This commit is contained in:
parent
4548ec3bf9
commit
e98eff613b
@ -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())
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -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 {
|
||||
|
Loading…
Reference in New Issue
Block a user