Skip to content

Commit

Permalink
Increase the map zoom.
Browse files Browse the repository at this point in the history
  • Loading branch information
Tensuko committed Jul 14, 2023
1 parent b7be006 commit e72afeb
Showing 1 changed file with 15 additions and 3 deletions.
18 changes: 15 additions & 3 deletions Courseplay.lua
Original file line number Diff line number Diff line change
Expand Up @@ -186,9 +186,21 @@ end
FSCareerMissionInfo.saveToXMLFile = Utils.prependedFunction(FSCareerMissionInfo.saveToXMLFile, Courseplay.saveToXMLFile)

function Courseplay:update(dt)
g_devHelper:update()
g_bunkerSiloManager:update(dt)
g_triggerManager:update(dt)
g_devHelper:update()
g_bunkerSiloManager:update(dt)
g_triggerManager:update(dt)
if not self.postInit then
-- Doubles the map zoom. Mainly to make it easier to set targets for unload triggers.
self.postInit = true
local function setIngameMapFix(mapElement)
local factor = 2*mapElement.terrainSize/2048
mapElement.zoomMax = mapElement.zoomMax * factor
mapElement.zoomDefault = mapElement.zoomDefault * factor
mapElement.mapZoom = mapElement.zoomDefault
end
setIngameMapFix(g_currentMission.inGameMenu.pageAI.ingameMap)
setIngameMapFix(g_currentMission.inGameMenu.pageMapOverview.ingameMap)
end
end

function Courseplay:draw()
Expand Down

0 comments on commit e72afeb

Please sign in to comment.