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(
21    clippy::doc_markdown,
22    clippy::must_use_candidate,
23    clippy::missing_errors_doc
24)]
25#![cfg_attr(
26    test,
27    allow(
28        clippy::assertions_on_result_states,
29        clippy::filetype_is_file,
30        clippy::indexing_slicing,
31        clippy::panic,
32        clippy::unwrap_used,
33    )
34)]
35
36mod enums;
37mod game_settings;
38mod ghostable_path;
39mod ini;
40mod load_order;
41mod openmw_config;
42mod plugin;
43#[cfg(test)]
44mod tests;
45
46pub use crate::enums::{Error, GameId, LoadOrderMethod};
47pub use crate::game_settings::GameSettings;
48pub use crate::load_order::{ReadableLoadOrder, WritableLoadOrder};
49
50fn is_enderal(game_path: &std::path::Path) -> bool {
51    game_path.join("Enderal Launcher.exe").exists()
52}