mirror of
https://github.com/doukutsu-rs/doukutsu-rs
synced 2024-11-22 13:42:47 +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)?;
|
||||
|
||||
if event_map.contains_key(&event_num) {
|
||||
return Err(ParseError(format!("Event {} has been defined twice.", event_num)));
|
||||
if strict {
|
||||
return Err(ParseError(format!("Event {} has been defined twice.", event_num)));
|
||||
} else {
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
let bytecode = TextScript::compile_event(&mut iter, strict)?;
|
||||
|
|
Loading…
Reference in a new issue