mirror of
https://github.com/loot/loot-condition-interpreter.git
synced 2026-07-27 14:16:09 -07:00
Add support for Starfield
As far as loot-condition-interpreter is concerned, it's not really any different from Fallout 4.
This commit is contained in:
@@ -72,3 +72,7 @@ pub static LCI_GAME_SKYRIM_VR: c_int = 3;
|
||||
/// Game code for Fallout 4 VR.
|
||||
#[no_mangle]
|
||||
pub static LCI_GAME_FALLOUT_4_VR: c_int = 7;
|
||||
|
||||
/// Game code for Starfield.
|
||||
#[no_mangle]
|
||||
pub static LCI_GAME_STARFIELD: c_int = 9;
|
||||
|
||||
@@ -42,6 +42,7 @@ pub fn map_game_type(game_type: c_int) -> Result<GameType, c_int> {
|
||||
x if x == LCI_GAME_FALLOUT_NV => Ok(GameType::FalloutNV),
|
||||
x if x == LCI_GAME_FALLOUT_4 => Ok(GameType::Fallout4),
|
||||
x if x == LCI_GAME_FALLOUT_4_VR => Ok(GameType::Fallout4VR),
|
||||
x if x == LCI_GAME_STARFIELD => Ok(GameType::Starfield),
|
||||
_ => Err(LCI_ERROR_INVALID_ARGS),
|
||||
}
|
||||
}
|
||||
|
||||
@@ -21,6 +21,7 @@ void test_game_id_values() {
|
||||
assert(LCI_GAME_FALLOUT_NV == 5);
|
||||
assert(LCI_GAME_FALLOUT_4 == 6);
|
||||
assert(LCI_GAME_FALLOUT_4_VR == 7);
|
||||
assert(LCI_GAME_STARFIELD == 9);
|
||||
}
|
||||
|
||||
void test_lci_condition_parse() {
|
||||
|
||||
Reference in New Issue
Block a user