loadorder/
lib.rs

1/*
2 * This file is part of libloadorder
3 *
4 * Copyright (C) 2017 Oliver Hamlet
5 *
6 * libloadorder is free software: you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation, either version 3 of the License, or
9 * (at your option) any later version.
10 *
11 * libloadorder is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with libloadorder. If not, see <http://www.gnu.org/licenses/>.
18 */
19// Allow a few clippy pedantic lints.
20#![allow(clippy::doc_markdown)]
21#![allow(clippy::must_use_candidate)]
22#![allow(clippy::missing_errors_doc)]
23#![cfg_attr(
24    test,
25    allow(
26        clippy::assertions_on_result_states,
27        clippy::filetype_is_file,
28        clippy::indexing_slicing,
29        clippy::panic,
30        clippy::unwrap_used,
31    )
32)]
33
34mod enums;
35mod game_settings;
36mod ghostable_path;
37mod ini;
38mod load_order;
39mod openmw_config;
40mod plugin;
41#[cfg(test)]
42mod tests;
43
44pub use crate::enums::{Error, GameId, LoadOrderMethod};
45pub use crate::game_settings::GameSettings;
46pub use crate::load_order::{ReadableLoadOrder, WritableLoadOrder};
47
48fn is_enderal(game_path: &std::path::Path) -> bool {
49    game_path.join("Enderal Launcher.exe").exists()
50}