-
Notifications
You must be signed in to change notification settings - Fork 58
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Run parser: deserialize the AutoSplitterSettings
This commit implements the deserialization of the AutoSplitterSettings XML section of a LiveSplit splits file. This can surely use some improvements regarding the compatibility without the auto-splitting feature and some other things. I think it is good as a first step though and we can keep iterating on it.
- Loading branch information
1 parent
47a2b51
commit ffca5d4
Showing
10 changed files
with
666 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
use crate::run::parser::livesplit::Version; | ||
use core::fmt::Debug; | ||
use livesplit_auto_splitting::settings; | ||
|
||
#[derive(Debug, Default, Clone, PartialEq)] | ||
pub struct AutoSplitterSettings { | ||
pub version: Version, | ||
pub script_path: String, | ||
pub custom_settings: settings::Map, | ||
} | ||
|
||
impl AutoSplitterSettings { | ||
pub fn set_version(&mut self, version: Version) { | ||
self.version = version; | ||
} | ||
|
||
pub fn set_script_path(&mut self, script_path: String) { | ||
self.script_path = script_path; | ||
} | ||
|
||
pub fn set_custom_settings(&mut self, custom_settings: settings::Map) { | ||
self.custom_settings = custom_settings; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.