mirror of
https://github.com/loot/loot-condition-interpreter.git
synced 2026-07-27 14:16:09 -07:00
Add support for OpenMW .omwaddon and .omwgame plugins
This commit is contained in:
@@ -76,3 +76,7 @@ pub static LCI_GAME_FALLOUT_4_VR: c_int = 7;
|
||||
/// Game code for Starfield.
|
||||
#[no_mangle]
|
||||
pub static LCI_GAME_STARFIELD: c_int = 9;
|
||||
|
||||
/// Game code for OpenMW.
|
||||
#[no_mangle]
|
||||
pub static LCI_GAME_OPENMW: c_int = 10;
|
||||
|
||||
@@ -33,6 +33,7 @@ fn map_error(err: &Error) -> c_int {
|
||||
|
||||
pub fn map_game_type(game_type: c_int) -> Result<GameType, c_int> {
|
||||
match game_type {
|
||||
x if x == LCI_GAME_OPENMW => Ok(GameType::OpenMW),
|
||||
x if x == LCI_GAME_MORROWIND => Ok(GameType::Morrowind),
|
||||
x if x == LCI_GAME_OBLIVION => Ok(GameType::Oblivion),
|
||||
x if x == LCI_GAME_SKYRIM => Ok(GameType::Skyrim),
|
||||
|
||||
@@ -22,6 +22,7 @@ void test_game_id_values() {
|
||||
assert(LCI_GAME_FALLOUT_4 == 6);
|
||||
assert(LCI_GAME_FALLOUT_4_VR == 7);
|
||||
assert(LCI_GAME_STARFIELD == 9);
|
||||
assert(LCI_GAME_OPENMW == 10);
|
||||
}
|
||||
|
||||
void test_lci_condition_parse() {
|
||||
|
||||
Reference in New Issue
Block a user