Skip to content
This repository has been archived by the owner on Nov 8, 2024. It is now read-only.

Commit

Permalink
1.2.0.0 - small HUD headland distance adjustments
Browse files Browse the repository at this point in the history
ZhooL committed Jan 24, 2022

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
1 parent 5838cf1 commit 540cd4a
Showing 2 changed files with 7 additions and 3 deletions.
6 changes: 4 additions & 2 deletions FS22_EnhancedVehicle.lua
Original file line number Diff line number Diff line change
@@ -16,7 +16,7 @@ CHANGELOG
- Press RShift+Home to switch throught operating modes: "snap to direction" or "snap to track"
- Hold RShift+Home to disable track assistant
- Press RStrg+Numpad1 to (re)calculate working width
* Leaving a vehicle will no longer disable snap direction/track
* leaving a vehicle will no longer disable snap direction/track
* remapped move offset line from RAlt+Numpad -/+ to RShift+RCtrl+Numpad -/+
2022-01-15 - V1.1.3.1
@@ -608,7 +608,7 @@ function FS22_EnhancedVehicle:onPostLoad(savegame)
self.vData.opMode = 0
self.vData.triggerCalculate = false
self.vData.impl = { isCalculated = false }
self.vData.track = { isCalculated = false, deltaTrack = 1, headlandMode = 1, headlandDistance = 9999, isOnField = 0, eofDistance = 0, eofNext = 0 }
self.vData.track = { isCalculated = false, deltaTrack = 1, headlandMode = 1, headlandDistance = 9999, isOnField = 0, eofDistance = -1, eofNext = 0 }

-- (server) set some defaults
if self.isServer then
@@ -831,6 +831,8 @@ function FS22_EnhancedVehicle:onUpdate(dt)
end
end
end -- <- end headland
else
self.vData.track.eofDistance = -1
end -- <- end track assistant
end
end
4 changes: 3 additions & 1 deletion ui/FS22_EnhancedVehicle_HUD.lua
Original file line number Diff line number Diff line change
@@ -787,8 +787,10 @@ function FS22_EnhancedVehicle_HUD:drawHUD()
color = FS22_EnhancedVehicle_HUD.COLOR.ACTIVE
elseif self.vehicle.vData.track.eofDistance > 10 then
color = FS22_EnhancedVehicle_HUD.COLOR.STANDBY
else
elseif self.vehicle.vData.track.eofDistance >= 0 then
color = { 1, 0, 0, 1 }
else
color = FS22_EnhancedVehicle_HUD.COLOR.INACTIVE
end
setTextColor(unpack(color))
end

0 comments on commit 540cd4a

Please sign in to comment.