Skip to content

Commit

Permalink
Minor readability improvement
Browse files Browse the repository at this point in the history
  • Loading branch information
Ortham committed Oct 7, 2024
1 parent c6e852d commit 26b42f5
Showing 1 changed file with 6 additions and 9 deletions.
15 changes: 6 additions & 9 deletions src/plugin.rs
Original file line number Diff line number Diff line change
Expand Up @@ -243,15 +243,12 @@ impl Plugin {
}

pub fn is_light_plugin(&self) -> bool {
if self.game_id.supports_light_plugins() {
if self.game_id == GameId::Starfield {
// If the inject flag is set, it prevents the .esl extension from
// causing the light flag to be forcibly set on load.
self.is_light_flag_set()
|| (!self.is_update_flag_set() && self.file_extension() == FileExtension::Esl)
} else {
self.is_light_flag_set() || self.file_extension() == FileExtension::Esl
}
// If the update flag is set, it prevents the .esl extension from
// causing the light flag to be forcibly set on load.
if self.game_id == GameId::Starfield && self.is_update_flag_set() {
self.is_light_flag_set()
} else if self.game_id.supports_light_plugins() {
self.is_light_flag_set() || self.file_extension() == FileExtension::Esl
} else {
false
}
Expand Down

0 comments on commit 26b42f5

Please sign in to comment.