More work on WASM handling.
Some checks failed
continuous-integration/drone/push Build is failing

This commit is contained in:
2022-08-20 12:22:12 +02:00
parent 703fd2c147
commit 2d4253e155
36 changed files with 922 additions and 87 deletions

View File

@@ -276,7 +276,7 @@ pub fn load_species(path: &String, library: &mut StaticData) {
}
fn load_wasm(path: &String, library: &mut WebAssemblyScriptResolver) {
let file = File::open(path.to_string() + "gen7_scripts_rs.wasm").unwrap();
let file = File::open(path.to_string() + "gen7_scripts.wasm").unwrap();
let mut reader = BufReader::new(file);
let mut buffer = Vec::new();
reader.read_to_end(&mut buffer).unwrap();
@@ -392,7 +392,7 @@ fn parse_effect_parameter(value: &Value) -> EffectParameter {
EffectParameter::Int(n.as_i64().unwrap())
}
}
Value::String(s) => EffectParameter::String(s.clone()),
Value::String(s) => EffectParameter::String(StringKey::new(s.as_str())),
Value::Array(_) => {
panic!("Unexpected type")
}