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:
Oliver Hamlet
2023-09-05 18:48:44 +01:00
parent 9a29925b21
commit 30c140eb4d
6 changed files with 16 additions and 3 deletions
+4
View File
@@ -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;
+1
View File
@@ -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),
}
}
+1
View File
@@ -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() {