Skip to content

Commit

Permalink
Updated dependency window to work with Everest entities/triggers with…
Browse files Browse the repository at this point in the history
… associated mods set up

This also makes it easier to find Everest content in your level, as it now searches for it
  • Loading branch information
Cruor committed Jan 29, 2023
1 parent 8715eb3 commit 779abe3
Showing 1 changed file with 3 additions and 9 deletions.
12 changes: 3 additions & 9 deletions src/ui/windows/dependency_window.lua
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ local dependencyWindowGroup = uiElements.group({}):with({

})

local everestModName = "everest"
local everestModName = "Everest"

local function localizeModName(modName, language)
local language = language or languageRegistry.getLanguage()
Expand Down Expand Up @@ -126,12 +126,6 @@ local function addDependencyCallback(modName, interactionData)
local modInfo, modMetadata = mods.findLoadedMod(modName)
local modVersion = modInfo and modInfo.Version

-- Special case for Everest
if modName == everestModName then
modName = localizeModName(everestModName)
modVersion = mods.getEverestVersion()
end

table.insert(dependencies, {
Name = modName,
Version = modVersion
Expand Down Expand Up @@ -279,7 +273,7 @@ function dependencyWindow.getWindowContent(modPath, side, interactionData)
local localizedEverestName = localizeModName(everestModName)
local hasEverest = dependedOnModsLookup[everestModName] or dependedOnModsLookup[localizedEverestName]

if not hasEverest then
if not hasEverest and not missingMods[everestModName] then
missingMods[everestModName] = false
end

Expand Down Expand Up @@ -362,7 +356,7 @@ local function createStartingEverestYaml(filename, side, metadata)

if everestVersion then
table.insert(dependencies, {
Name = "Everest",
Name = everestModName,
Version = everestVersion
})
end
Expand Down

0 comments on commit 779abe3

Please sign in to comment.