From 0d68848155400f2c2b4bdc3063b57562d9280b0b Mon Sep 17 00:00:00 2001 From: Peter Vaiko Date: Tue, 12 Nov 2024 18:48:09 -0500 Subject: [PATCH 1/2] chore: FS25 compatibility updates Looks like now some GUI elements can't be created as the 22 profiles we used do not exist. --- Courseplay.lua | 2 +- modDesc.xml | 2 +- scripts/Waypoint.lua | 2 +- scripts/ai/controllers/ShovelController.lua | 4 ++-- .../ai/parameters/AIParameterSettingList.lua | 18 +++++++++--------- scripts/gui/CpAIFrameExtended.lua | 2 +- scripts/gui/CpCourseManagerFrame.lua | 2 +- scripts/gui/CpGamePadHudScreen.lua | 2 +- scripts/gui/CpGlobalSettingsFrame.lua | 2 +- scripts/gui/CpGuiUtil.lua | 2 +- scripts/gui/CpVehicleSettingsFrame.lua | 2 +- 11 files changed, 20 insertions(+), 20 deletions(-) diff --git a/Courseplay.lua b/Courseplay.lua index 528015fe4..9964ec83d 100644 --- a/Courseplay.lua +++ b/Courseplay.lua @@ -74,7 +74,7 @@ function Courseplay:showUserInformation(xmlFile, key) self.MOD_NAME, self.currentVersion, lastLoadedVersion) if showInfoDialog then - g_gui:showInfoDialog({ + g_gui:showDialog({ text = string.format(g_i18n:getText("CP_infoText"), self.currentVersion) }) if xmlFile then diff --git a/modDesc.xml b/modDesc.xml index 61f776880..b694a0714 100644 --- a/modDesc.xml +++ b/modDesc.xml @@ -1,5 +1,5 @@ - + 7.5.0.1 diff --git a/scripts/Waypoint.lua b/scripts/Waypoint.lua index bea476c72..542838f68 100644 --- a/scripts/Waypoint.lua +++ b/scripts/Waypoint.lua @@ -39,7 +39,7 @@ function Waypoint:init(wp) self.rev = self.rev or wp.gear and wp.gear == Gear.Backward -- dynamically added/calculated properties self.useTightTurnOffset = wp.useTightTurnOffset - self.turnControls = table.copy(wp.turnControls) + self.turnControls = table.clone(wp.turnControls) self.dToNext = wp.dToNext self.yRot = wp.yRot --- Set, when generated for a multi tool course diff --git a/scripts/ai/controllers/ShovelController.lua b/scripts/ai/controllers/ShovelController.lua index 8f5d03329..bddee17e7 100644 --- a/scripts/ai/controllers/ShovelController.lua +++ b/scripts/ai/controllers/ShovelController.lua @@ -10,8 +10,8 @@ ShovelController.POSITIONS = { } ShovelController.MAX_TRIGGER_HEIGHT = 8 ShovelController.MIN_TRIGGER_HEIGHT = 1 -ShovelController.TRIGGER_HEIGHT_RAYCAST_COLLISION_MASK = CollisionFlag.STATIC_WORLD + CollisionFlag.STATIC_OBJECTS + - CollisionFlag.STATIC_OBJECT + CollisionFlag.VEHICLE +ShovelController.TRIGGER_HEIGHT_RAYCAST_COLLISION_MASK = + CollisionFlag.DEFAULT + CollisionFlag.STATIC_OBJECT + CollisionFlag.VEHICLE function ShovelController:init(vehicle, implement, isConsoleCommand) ImplementController.init(self, vehicle, implement) diff --git a/scripts/ai/parameters/AIParameterSettingList.lua b/scripts/ai/parameters/AIParameterSettingList.lua index 1e183a833..8edb0dcdb 100644 --- a/scripts/ai/parameters/AIParameterSettingList.lua +++ b/scripts/ai/parameters/AIParameterSettingList.lua @@ -15,8 +15,8 @@ function AIParameterSettingList:init(data, vehicle, class) if next(data.values) ~=nil then --- The setting has values defined in the data, so we copy these here. --- This saves the unmodified values in the data table. - self.values = table.copy(data.values) - self.texts = table.copy(data.texts) + self.values = table.clone(data.values) + self.texts = table.clone(data.texts) elseif data.min ~= nil and data.max ~=nil then --- The setting has a min and max value, --- so we generate a series of float values and texts here. @@ -25,17 +25,17 @@ function AIParameterSettingList:init(data, vehicle, class) AIParameterSettingList.generateValues(self, self.data.values, self.data.texts, data.min, data.max, data.incremental, data.unit, data.precision) --- Same as above, make sure the values are copied. - self.values = table.copy(self.data.values) + self.values = table.clone(self.data.values) if self.data.texts ~= nil then - self.texts = table.copy(self.data.texts) + self.texts = table.clone(self.data.texts) end data.textInputAllowed = true elseif data.generateValuesFunction then --- A generation function by the parent class is used --- to enrich/create the setting values/texts. self.data.values, self.data.texts = self:getCallback(data.generateValuesFunction) - self.values = table.copy(self.data.values) - self.texts = table.copy(self.data.texts) + self.values = table.clone(self.data.values) + self.texts = table.clone(self.data.texts) self:validateTexts() end --- Text input is only allowed, when the settings values are numeric. @@ -50,7 +50,7 @@ function AIParameterSettingList:init(data, vehicle, class) --- Fallback text generation based on the numeric values and a optional given unit. self.data.texts = {} AIParameterSettingList.enrichTexts(self, self.data.texts, data.unit) - self.texts = table.copy(self.data.texts) + self.texts = table.clone(self.data.texts) end --- Lastly apply the default values here. if data.default ~=nil then @@ -474,8 +474,8 @@ end --- Resets the disabled values back to the orignal value table function AIParameterSettingList:resetValuesBackToSetupValues() - self.values = table.copy(self.data.values) - self.texts = table.copy(self.data.texts) + self.values = table.clone(self.data.values) + self.texts = table.clone(self.data.texts) end --- Gets a specific value. diff --git a/scripts/gui/CpAIFrameExtended.lua b/scripts/gui/CpAIFrameExtended.lua index b6696f41e..8406e27e9 100644 --- a/scripts/gui/CpAIFrameExtended.lua +++ b/scripts/gui/CpAIFrameExtended.lua @@ -47,7 +47,7 @@ function CpInGameMenuAIFrameExtended:onAIFrameLoadMapFinished() CpInGameMenuAIFrameExtended.setupButtons(self) - self:registerControls({"multiTextOptionPrefab","subTitlePrefab","courseGeneratorLayoutElements", + self:exposeControlsAsFields({"multiTextOptionPrefab","subTitlePrefab","courseGeneratorLayoutElements", "courseGeneratorLayout","courseGeneratorHeader","drawingCustomFieldHeader", "drawingCustomFieldSubHeader", "courseGeneratorFrame", "createCpMultiOptionTemplate", "createCpTextTemplate"}) diff --git a/scripts/gui/CpCourseManagerFrame.lua b/scripts/gui/CpCourseManagerFrame.lua index 2763e3238..ab3b7a452 100644 --- a/scripts/gui/CpCourseManagerFrame.lua +++ b/scripts/gui/CpCourseManagerFrame.lua @@ -74,7 +74,7 @@ local CpCourseManagerFrame_mt = Class(CpCourseManagerFrame, TabbedMenuFrameEleme function CpCourseManagerFrame.new(courseStorage, target, custom_mt) local self = TabbedMenuFrameElement.new(target, custom_mt or CpCourseManagerFrame_mt) - self:registerControls(CpCourseManagerFrame.CONTROLS) + self:exposeControlsAsFields(CpCourseManagerFrame.CONTROLS) self.courseStorage = courseStorage return self end diff --git a/scripts/gui/CpGamePadHudScreen.lua b/scripts/gui/CpGamePadHudScreen.lua index 83ae723bb..3f757c42b 100644 --- a/scripts/gui/CpGamePadHudScreen.lua +++ b/scripts/gui/CpGamePadHudScreen.lua @@ -22,7 +22,7 @@ local CpGamePadHudScreen_mt = Class(CpGamePadHudScreen, ScreenElement) function CpGamePadHudScreen.new(settings, target, custom_mt) local self = ScreenElement.new(target, custom_mt or CpGamePadHudScreen_mt) - self:registerControls(CpGamePadHudScreen.CONTROLS) + self:exposeControlsAsFields(CpGamePadHudScreen.CONTROLS) self.settings = settings return self end diff --git a/scripts/gui/CpGlobalSettingsFrame.lua b/scripts/gui/CpGlobalSettingsFrame.lua index 1c87077ee..7eb1112b5 100644 --- a/scripts/gui/CpGlobalSettingsFrame.lua +++ b/scripts/gui/CpGlobalSettingsFrame.lua @@ -17,7 +17,7 @@ local CpGlobalSettingsFrame_mt = Class(CpGlobalSettingsFrame, TabbedMenuFrameEle function CpGlobalSettingsFrame.new(target, custom_mt) local self = TabbedMenuFrameElement.new(target, custom_mt or CpGlobalSettingsFrame_mt) - self:registerControls(CpGlobalSettingsFrame.CONTROLS) + self:exposeControlsAsFields(CpGlobalSettingsFrame.CONTROLS) return self end diff --git a/scripts/gui/CpGuiUtil.lua b/scripts/gui/CpGuiUtil.lua index 59e56cdaa..9c29a274a 100644 --- a/scripts/gui/CpGuiUtil.lua +++ b/scripts/gui/CpGuiUtil.lua @@ -11,7 +11,7 @@ function CpGuiUtil.fixInGameMenuPage(frame, pageName, uvs, position, predicateFu inGameMenu.controlIDs[v] = nil end - inGameMenu:registerControls({pageName}) + inGameMenu:exposeControlsAsFields({pageName}) inGameMenu[pageName] = frame inGameMenu.pagingElement:addElement(inGameMenu[pageName]) diff --git a/scripts/gui/CpVehicleSettingsFrame.lua b/scripts/gui/CpVehicleSettingsFrame.lua index 68219697a..53028b49d 100644 --- a/scripts/gui/CpVehicleSettingsFrame.lua +++ b/scripts/gui/CpVehicleSettingsFrame.lua @@ -21,7 +21,7 @@ local CpVehicleSettingsFrame_mt = Class(CpVehicleSettingsFrame, TabbedMenuFrameE function CpVehicleSettingsFrame.new(target, custom_mt) local self = TabbedMenuFrameElement.new(target, custom_mt or CpVehicleSettingsFrame_mt) - self:registerControls(CpVehicleSettingsFrame.CONTROLS) + self:exposeControlsAsFields(CpVehicleSettingsFrame.CONTROLS) return self end From ff4b28a0f780787f6ffd077d48a3a5c67ad2a953 Mon Sep 17 00:00:00 2001 From: Peter Vaiko <peter.vaiko@siemens.com> Date: Wed, 13 Nov 2024 08:24:14 -0500 Subject: [PATCH 2/2] chore: FS25 compatibility updates Commented out lots of GUI stuff with TODO 25, game now starts. --- Courseplay.lua | 8 ++++-- config/gui/CourseManagerFrame.xml | 14 +++++----- scripts/ai/jobs/CpAIJobCombineUnloader.lua | 14 +++++----- scripts/ai/jobs/CpAIJobSiloLoader.lua | 28 +++++++++---------- scripts/gui/CpGamePadHudScreen.lua | 2 +- scripts/gui/hud/CpBaseHud.lua | 2 +- .../CpCourseGeneratorSettings.lua | 6 ++-- scripts/specializations/CpCourseManager.lua | 2 +- 8 files changed, 40 insertions(+), 36 deletions(-) diff --git a/Courseplay.lua b/Courseplay.lua index 9964ec83d..150b7a0ac 100644 --- a/Courseplay.lua +++ b/Courseplay.lua @@ -133,8 +133,8 @@ function Courseplay:setupGui() "CpVehicleSettingsFrame", vehicleSettingsFrame, true) g_gui:loadGui(Utils.getFilename("config/gui/GlobalSettingsFrame.xml", Courseplay.BASE_DIRECTORY), "CpGlobalSettingsFrame", globalSettingsFrame, true) - g_gui:loadGui(Utils.getFilename("config/gui/CourseManagerFrame.xml", Courseplay.BASE_DIRECTORY), - "CpCourseManagerFrame", courseManagerFrame, true) + --g_gui:loadGui(Utils.getFilename("config/gui/CourseManagerFrame.xml", Courseplay.BASE_DIRECTORY), + -- "CpCourseManagerFrame", courseManagerFrame, true) local function predicateFunc() -- Only allow the vehicle bound pages, when a vehicle with cp functionality is chosen/entered. local vehicle = CpInGameMenuAIFrameExtended.getVehicle() @@ -145,12 +145,14 @@ function Courseplay:setupGui() --- we move it down one position. local pos = g_modIsLoaded["FS22_precisionFarming"] and 4 or 3 +--[[ TODO 25 CpGuiUtil.fixInGameMenuPage(vehicleSettingsFrame, "pageCpVehicleSettings", {896, 0, 128, 128}, pos + 1, predicateFunc) CpGuiUtil.fixInGameMenuPage(globalSettingsFrame, "pageCpGlobalSettings", {768, 0, 128, 128}, pos + 1, function () return true end) CpGuiUtil.fixInGameMenuPage(courseManagerFrame, "pageCpCourseManager", {256, 0, 128, 128}, pos + 1, predicateFunc) +]] self.infoTextsHud = CpHudInfoTexts() g_currentMission.hud.ingameMap.drawFields = Utils.appendedFunction(g_currentMission.hud.ingameMap.drawFields, Courseplay.drawHudMap) @@ -352,7 +354,7 @@ function Courseplay.register(typeManager) CpAICombineUnloader.register(typeManager, typeName, typeEntry.specializations) CpAISiloLoaderWorker.register(typeManager, typeName, typeEntry.specializations) CpAIBunkerSiloWorker.register(typeManager, typeName, typeEntry.specializations) - CpGamePadHud.register(typeManager, typeName,typeEntry.specializations) + -- TODO 25 CpGamePadHud.register(typeManager, typeName,typeEntry.specializations) CpHud.register(typeManager, typeName, typeEntry.specializations) CpInfoTexts.register(typeManager, typeName, typeEntry.specializations) CpShovelPositions.register(typeManager, typeName, typeEntry.specializations) diff --git a/config/gui/CourseManagerFrame.xml b/config/gui/CourseManagerFrame.xml index 14b0c81d1..faa11c024 100644 --- a/config/gui/CourseManagerFrame.xml +++ b/config/gui/CourseManagerFrame.xml @@ -9,12 +9,12 @@ <GuiElement type="empty" profile="ingameMenuSettingsBox" id="mainBox"> <GuiElement type="empty" profile="ingameMenuPriceLeftColumn" id="leftColumn"> - <GuiElement type="boxLayout" profile="ingameCalendarHeaderBox" id="tableHeaderBox" size="680px 104px"> + <GuiElement type="boxLayout" profile="fs25_calendarHeaderBox" id="tableHeaderBox" size="680px 104px"> <GuiElement type="text" profile="ingameMenuPriceHeader" size="340px 104px" id="leftColumnHeader" /> </GuiElement> - <GuiElement type="smoothList" profile="ingameMenuPriceList" id="leftList" focusChangeTop="nil" focusChangeBottom="nil" selectedWithoutFocus="true"> - <GuiElement type="listItem" profile="ingameMenuPriceListItem"> + <GuiElement type="smoothList" profile="fs25_pricesPriceList" id="leftList" focusChangeTop="nil" focusChangeBottom="nil" selectedWithoutFocus="true"> + <GuiElement type="listItem" profile="fs25_pricesPriceListItem"> <GuiElement type="bitmap" name="icon" profile="ingameMenuPriceGoodsIcon" /> <GuiElement type="text" name="title" profile="ingameMenuPriceItemTitle" /> </GuiElement> @@ -26,13 +26,13 @@ </GuiElement> <GuiElement type="empty" profile="ingameMenuPriceRightColumn" id="rightColumn"> - <GuiElement type="boxLayout" profile="ingameCalendarHeaderBox" id="tableHeaderBox" size="680px 104px"> + <GuiElement type="boxLayout" profile="fs25_calendarHeaderBox" id="tableHeaderBox" size="680px 104px"> <GuiElement type="text" profile="ingameMenuPriceHeader" size="330px 104px" id="rightColumnHeader" /> </GuiElement> - <GuiElement type="smoothList" profile="ingameMenuPriceList" id="rightList" focusChangeTop="nil" focusChangeBottom="nil"> - <GuiElement type="listItem" profile="ingameMenuPriceListItem"> - <GuiElement type="bitmap" name="icon" profile="ingameMenuPriceItemHotspot" /> + <GuiElement type="smoothList" profile="fs25_pricesPriceList" id="rightList" focusChangeTop="nil" focusChangeBottom="nil"> + <GuiElement type="listItem" profile="fs25_pricesPriceListItem"> + <GuiElement type="bitmap" name="icon" profile="fs25_pricesPriceListItemHotspot" /> <GuiElement type="text" name="title" profile="ingameMenuPriceSellpointTitle" /> </GuiElement> </GuiElement> diff --git a/scripts/ai/jobs/CpAIJobCombineUnloader.lua b/scripts/ai/jobs/CpAIJobCombineUnloader.lua index 7aa5afc0e..d4821ec41 100644 --- a/scripts/ai/jobs/CpAIJobCombineUnloader.lua +++ b/scripts/ai/jobs/CpAIJobCombineUnloader.lua @@ -19,8 +19,8 @@ function CpAIJobCombineUnloader.new(isServer, customMt) self.selectedFieldPlot:setVisible(false) self.selectedFieldPlot:setBrightColor(true) - self.heapPlot = HeapPlot(g_currentMission.inGameMenu.ingameMap) - self.heapPlot:setVisible(false) + --TODO 25 self.heapPlot = HeapPlot(g_currentMission.inGameMenu.ingameMap) + --TODO 25 self.heapPlot:setVisible(false) self.heapNode = CpUtil.createNode("siloNode", 0, 0, 0, nil) --- Giants unload @@ -138,7 +138,7 @@ end --- Called when parameters change, scan field function CpAIJobCombineUnloader:validate(farmId) self.selectedFieldPlot:setVisible(false) - self.heapPlot:setVisible(false) + --TODO 25 self.heapPlot:setVisible(false) local isValid, errorMessage = CpAIJob.validate(self, farmId) if not isValid then return isValid, errorMessage @@ -220,9 +220,9 @@ function CpAIJobCombineUnloader:validate(farmId) setTranslation(self.heapNode, x, 0, z) setRotation(self.heapNode, 0, angle, 0) local found, heapSilo = BunkerSiloManagerUtil.createHeapBunkerSilo(vehicle, self.heapNode, 0, self.maxHeapLength, -10) - if found then - self.heapPlot:setArea(heapSilo:getArea()) - self.heapPlot:setVisible(true) + if found then + --TODO 25 self.heapPlot:setArea(heapSilo:getArea()) + --TODO 25 self.heapPlot:setVisible(true) end end @@ -233,7 +233,7 @@ function CpAIJobCombineUnloader:draw(map, isOverviewMap) CpAIJob.draw(self, map, isOverviewMap) if not isOverviewMap then self.selectedFieldPlot:draw(map) - self.heapPlot:draw(map) + --TODO 25 self.heapPlot:draw(map) end end diff --git a/scripts/ai/jobs/CpAIJobSiloLoader.lua b/scripts/ai/jobs/CpAIJobSiloLoader.lua index 8ae7dd319..5584b7874 100644 --- a/scripts/ai/jobs/CpAIJobSiloLoader.lua +++ b/scripts/ai/jobs/CpAIJobSiloLoader.lua @@ -20,10 +20,10 @@ CpAIJobSiloLoader.MAX_UNLOAD_TARGET_DISTANCE_FROM_SILO = 180 function CpAIJobSiloLoader.new(isServer, customMt) local self = CpAIJob.new(isServer, customMt or AIJobCombineUnloaderCp_mt) - self.heapPlot = HeapPlot(g_currentMission.inGameMenu.ingameMap) - self.heapPlot:setVisible(false) + --TODO 25 self.heapPlot = HeapPlot(g_currentMission.inGameMenu.ingameMap) + --TODO 25 self.heapPlot:setVisible(false) - self.trailerAreaPlot = HeapPlot(g_currentMission.inGameMenu.ingameMap) + --TODO 25 self.trailerAreaPlot = HeapPlot(g_currentMission.inGameMenu.ingameMap) self.heapNode = CpUtil.createNode("siloNode", 0, 0, 0, nil) @@ -101,8 +101,8 @@ function CpAIJobSiloLoader:setValues() if bunkerSilo then self.bunkerSilo = bunkerSilo elseif heapSilo then - self.heapPlot:setArea(heapSilo:getArea()) - self.heapPlot:setVisible(true) + --TODO 25 self.heapPlot:setArea(heapSilo:getArea()) + --TODO 25 self.heapPlot:setVisible(true) self.heap = heapSilo end self.siloLoaderTask:setSiloAndHeap(self.bunkerSilo, self.heap) @@ -112,8 +112,8 @@ end --- Called when parameters change, scan field function CpAIJobSiloLoader:validate(farmId) - self.heapPlot:setVisible(false) - self.trailerAreaPlot:setVisible(false) + --TODO 25 self.heapPlot:setVisible(false) + --TODO 25 self.trailerAreaPlot:setVisible(false) self.heap = nil self.bunkerSilo = nil self.unloadStation = nil @@ -136,8 +136,8 @@ function CpAIJobSiloLoader:validate(farmId) if bunkerSilo then self.bunkerSilo = bunkerSilo elseif heapSilo then - self.heapPlot:setArea(heapSilo:getArea()) - self.heapPlot:setVisible(true) + --TODO 25 self.heapPlot:setArea(heapSilo:getArea()) + --TODO 25 self.heapPlot:setVisible(true) self.heap = heapSilo end self.siloLoaderTask:setSiloAndHeap(self.bunkerSilo, self.heap) @@ -175,9 +175,9 @@ function CpAIJobSiloLoader:validate(farmId) else local found, area, validDistanceToSilo = CpAIJobSiloLoader.getTrailerUnloadArea( self.cpJobParameters.unloadPosition, self.bunkerSilo or self.heap) - if found then - self.trailerAreaPlot:setVisible(true) - self.trailerAreaPlot:setArea(area) + if found then + --TODO 25 self.trailerAreaPlot:setVisible(true) + --TODO 25 self.trailerAreaPlot:setArea(area) end if not validDistanceToSilo then return false, g_i18n:getText("CP_error_unload_target_to_far_away_from_silo") @@ -324,7 +324,7 @@ end function CpAIJobSiloLoader:draw(map, isOverviewMap) CpAIJob.draw(self, map, isOverviewMap) if not isOverviewMap then - self.heapPlot:draw(map) + --TODO 25 self.heapPlot:draw(map) g_bunkerSiloManager:drawSilos(map, self.bunkerSilo) if self.cpJobParameters.unloadAt:getValue() == CpSiloLoaderJobParameters.UNLOAD_TRIGGER then local fillTypes = self:getConvertedFillTypes() @@ -335,7 +335,7 @@ function CpAIJobSiloLoader:draw(map, isOverviewMap) g_triggerManager:drawDischargeableTriggers(map, self.unloadTrigger, fillTypes) else --- Drawing trailer area - self.trailerAreaPlot:draw(map) + --TODO 25 self.trailerAreaPlot:draw(map) end end end diff --git a/scripts/gui/CpGamePadHudScreen.lua b/scripts/gui/CpGamePadHudScreen.lua index 3f757c42b..2e1562ae6 100644 --- a/scripts/gui/CpGamePadHudScreen.lua +++ b/scripts/gui/CpGamePadHudScreen.lua @@ -39,7 +39,7 @@ function CpGamePadHudScreen:onGuiSetupFinished() self.clearButton:unlinkElement() FocusManager:removeElement(self.clearButton) - self.clearButton:setText(g_i18n:getText("CP_courseManager_clear_current_courses")) + -- TODO 25 (didn't we just remove this button above?) self.clearButton:setText(g_i18n:getText("CP_courseManager_clear_current_courses")) self.backButton:unlinkElement() FocusManager:removeElement(self.backButton) diff --git a/scripts/gui/hud/CpBaseHud.lua b/scripts/gui/hud/CpBaseHud.lua index 6d26e45ef..59b6469b6 100644 --- a/scripts/gui/hud/CpBaseHud.lua +++ b/scripts/gui/hud/CpBaseHud.lua @@ -278,7 +278,7 @@ function CpBaseHud:init(vehicle) --- Create start/stop button local onOffBtnWidth, height = getNormalizedScreenValues(20, 20) local onOffIndicatorOverlay = CpGuiUtil.createOverlay({onOffBtnWidth, height}, - {g_baseUIFilename, GuiUtils.getUVs(MixerWagonHUDExtension.UV.RANGE_MARKER_ARROW)}, + {g_baseUIFilename, GuiUtils.getUVs(self.uvs.streetDriveToSymbol)}, --TODO 25 self.OFF_COLOR, self.alignments.bottomRight) self.onOffButton = CpHudButtonElement.new(onOffIndicatorOverlay, self.baseHud) diff --git a/scripts/specializations/CpCourseGeneratorSettings.lua b/scripts/specializations/CpCourseGeneratorSettings.lua index 84c8430aa..9b5dffa16 100644 --- a/scripts/specializations/CpCourseGeneratorSettings.lua +++ b/scripts/specializations/CpCourseGeneratorSettings.lua @@ -92,7 +92,8 @@ function CpCourseGeneratorSettings:onLoad(savegame) --- Register the spec: spec_cpCourseGeneratorSettings self.spec_cpCourseGeneratorSettings = self["spec_" .. CpCourseGeneratorSettings.SPEC_NAME] local spec = self.spec_cpCourseGeneratorSettings - spec.gui = g_currentMission.inGameMenu.pageAI + -- TODO 25 + -- spec.gui = g_currentMission.inGameMenu.pageAI --- Clones the generic settings to create different settings containers for each vehicle. CpSettingsUtil.cloneSettingsTable(spec,CpCourseGeneratorSettings.settings,self,CpCourseGeneratorSettings) @@ -246,7 +247,8 @@ end ---@param callbackStr string event to be raised ---@param setting AIParameterSettingList setting that raised the callback. function CpCourseGeneratorSettings:raiseCallback(callbackStr, setting, ...) - SpecializationUtil.raiseEvent(self, callbackStr, setting, ...) + -- TODO 25 event is registered by the HUD which is now disabled + --TODO 25 SpecializationUtil.raiseEvent(self, callbackStr, setting, ...) end function CpCourseGeneratorSettings:raiseDirtyFlag(setting) diff --git a/scripts/specializations/CpCourseManager.lua b/scripts/specializations/CpCourseManager.lua index 5a5c38568..6ac796bb4 100644 --- a/scripts/specializations/CpCourseManager.lua +++ b/scripts/specializations/CpCourseManager.lua @@ -125,7 +125,7 @@ function CpCourseManager:onLoad(savegame) --- Register the spec: spec_cpCourseManager self.spec_cpCourseManager = self["spec_" .. CpCourseManager.SPEC_NAME] local spec = self.spec_cpCourseManager - spec.coursePlot = CoursePlot(g_currentMission.inGameMenu.ingameMap) + -- TODO 25 spec.coursePlot = CoursePlot(g_currentMission.inGameMenu.ingameMap) spec.courses = {}