Skip to content
This repository has been archived by the owner on May 23, 2023. It is now read-only.

Commit

Permalink
6.01.00170:bugfix HUD
Browse files Browse the repository at this point in the history
  • Loading branch information
ThomasGaertner committed Apr 9, 2019
1 parent b40b117 commit 7086fd0
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 9 deletions.
2 changes: 1 addition & 1 deletion base.lua
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ function courseplay:onLoad(savegame)

-- CP mode
self.cp.mode = courseplay.MODE_TRANSPORT;
courseplay:setNextPrevModeVars(self);
--courseplay:setNextPrevModeVars(self);
self.cp.modeState = 0
self.cp.mode2nextState = nil;
self.cp.heapStart = nil
Expand Down
2 changes: 1 addition & 1 deletion modDesc.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8" standalone="no" ?>
<modDesc descVersion="40">
<version>6.01.00169</version>
<version>6.01.00170</version>
<author><![CDATA[Courseplay.devTeam]]></author>
<title>
<br>CoursePlay SIX</br>
Expand Down
13 changes: 6 additions & 7 deletions settings.lua
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,15 @@ function courseplay:openCloseHud(vehicle, open)
end;

function courseplay:setCpMode(vehicle, modeNum)


if vehicle.cp.mode ~= modeNum then
vehicle.cp.mode = modeNum;
courseplay:setNextPrevModeVars(vehicle);
--courseplay:setNextPrevModeVars(vehicle);
courseplay.utils:setOverlayUVsPx(vehicle.cp.hud.currentModeIcon, courseplay.hud.bottomInfo.modeUVsPx[modeNum], courseplay.hud.iconSpriteSize.x, courseplay.hud.iconSpriteSize.y);
courseplay.buttons:setActiveEnabled(vehicle, 'all');
--courseplay.buttons:setActiveEnabled(vehicle, 'all');
if modeNum == 1 then
courseplay:resetTools(vehicle);
end;
vehicle.cp.runNumber = 11; --peter will find a better way
--if not CpManager.isDeveloper then
if modeNum == courseplay.MODE_COMBI then
vehicle.cp.drivingMode:set(DrivingModeSetting.DRIVING_MODE_NORMAL)
Expand Down Expand Up @@ -56,7 +55,7 @@ function courseplay:setAIDriver(vehicle, mode)
end
end

function courseplay:setNextPrevModeVars(vehicle)
--[[function courseplay:setNextPrevModeVars(vehicle)
local curMode = vehicle.cp.mode;
local nextMode, prevMode, nextModeTest, prevModeTest = nil, nil, curMode + 1, curMode - 1;
Expand Down Expand Up @@ -85,7 +84,7 @@ function courseplay:setNextPrevModeVars(vehicle)
end;
end;
vehicle.cp.nextMode = nextMode;
end;
end;]]

function courseplay:getCanVehicleUseMode(vehicle, mode)
if not CpManager.isDeveloper then
Expand Down Expand Up @@ -1148,7 +1147,7 @@ end;

function courseplay:toggleHeadlandOrder(vehicle)
vehicle.cp.headland.orderBefore = not vehicle.cp.headland.orderBefore;
vehicle.cp.headland.orderButton:setSpriteSectionUVs(vehicle.cp.headland.orderBefore and 'headlandOrdBef' or 'headlandOrdAft');
--vehicle.cp.headland.orderButton:setSpriteSectionUVs(vehicle.cp.headland.orderBefore and 'headlandOrdBef' or 'headlandOrdAft');
-- courseplay:debug(string.format('toggleHeadlandOrder(): orderBefore=%s -> set to %q, setOverlay(orderButton, %d)', tostring(not vehicle.cp.headland.orderBefore), tostring(vehicle.cp.headland.orderBefore), vehicle.cp.headland.orderBefore and 1 or 2), 7);
end;

Expand Down

0 comments on commit 7086fd0

Please sign in to comment.