mirror of
https://github.com/loot/libloot.git
synced 2026-07-27 14:16:01 -07:00
Check Oblivion Remastered plugins' master flag
Although the game doesn't require master files to load before non-master files, if they load after that can apparently cause issues, so make LOOT sort master files first.
This commit is contained in:
@@ -186,8 +186,7 @@ TEST_P(PluginInterfaceTest,
|
||||
|
||||
EXPECT_EQ(blankEsm, plugin->GetName());
|
||||
EXPECT_TRUE(plugin->GetMasters().empty());
|
||||
if (GetParam() == GameType::openmw ||
|
||||
GetParam() == GameType::oblivionRemastered) {
|
||||
if (GetParam() == GameType::openmw) {
|
||||
EXPECT_FALSE(plugin->IsMaster());
|
||||
} else {
|
||||
EXPECT_TRUE(plugin->IsMaster());
|
||||
@@ -212,8 +211,7 @@ TEST_P(PluginInterfaceTest, shouldBeAbleToGetAllDataFromFullyLoadedPlugin) {
|
||||
|
||||
EXPECT_EQ(blankEsm, plugin->GetName());
|
||||
EXPECT_TRUE(plugin->GetMasters().empty());
|
||||
if (GetParam() == GameType::openmw ||
|
||||
GetParam() == GameType::oblivionRemastered) {
|
||||
if (GetParam() == GameType::openmw) {
|
||||
EXPECT_FALSE(plugin->IsMaster());
|
||||
} else {
|
||||
EXPECT_TRUE(plugin->IsMaster());
|
||||
|
||||
+3
-6
@@ -170,10 +170,7 @@ impl Plugin {
|
||||
/// sometimes referred to as *master files* or simply *masters*, while the
|
||||
/// other meaning is always referenced in relation to another plugin.
|
||||
pub fn is_master(&self) -> bool {
|
||||
if matches!(
|
||||
self.game_type,
|
||||
GameType::OpenMW | GameType::OblivionRemastered
|
||||
) {
|
||||
if self.game_type == GameType::OpenMW {
|
||||
false
|
||||
} else {
|
||||
self.plugin
|
||||
@@ -544,7 +541,7 @@ mod tests {
|
||||
|
||||
assert_eq!(plugin_name, plugin.name());
|
||||
assert_eq!(expected_masters, plugin.masters().unwrap());
|
||||
if matches!(game_type, GameType::OpenMW | GameType::OblivionRemastered) {
|
||||
if matches!(game_type, GameType::OpenMW) {
|
||||
assert!(!plugin.is_master());
|
||||
} else {
|
||||
assert!(plugin.is_master());
|
||||
@@ -621,7 +618,7 @@ mod tests {
|
||||
|
||||
assert_eq!(plugin_name, plugin.name());
|
||||
assert_eq!(expected_masters, plugin.masters().unwrap());
|
||||
if matches!(game_type, GameType::OpenMW | GameType::OblivionRemastered) {
|
||||
if matches!(game_type, GameType::OpenMW) {
|
||||
assert!(!plugin.is_master());
|
||||
} else {
|
||||
assert!(plugin.is_master());
|
||||
|
||||
Reference in New Issue
Block a user