mirror of
https://github.com/doukutsu-rs/doukutsu-rs
synced 2025-11-28 15:27:27 +00:00
tsc: do not throw event redefinition error in non-strict mode
This commit is contained in:
parent
1758aa5740
commit
bf03c6c9a1
|
|
@ -729,7 +729,11 @@ impl TextScript {
|
||||||
TextScript::skip_until(b'\n', &mut iter)?;
|
TextScript::skip_until(b'\n', &mut iter)?;
|
||||||
|
|
||||||
if event_map.contains_key(&event_num) {
|
if event_map.contains_key(&event_num) {
|
||||||
|
if strict {
|
||||||
return Err(ParseError(format!("Event {} has been defined twice.", event_num)));
|
return Err(ParseError(format!("Event {} has been defined twice.", event_num)));
|
||||||
|
} else {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
let bytecode = TextScript::compile_event(&mut iter, strict)?;
|
let bytecode = TextScript::compile_event(&mut iter, strict)?;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue