Skip to content

Commit

Permalink
Release 1.1.1.0
Browse files Browse the repository at this point in the history
FIX collision handling caused unloader to stop-and-go behind chopper
FIX multiple trailer unload harvester
TWEAK improved liquid overload:
- only start loading in silo-trigger-range and if trigger is found
TWEAK harvester - unloader - co-operation:
- increased reverse distance for unloader
- CP harvester should wait some seconds while unloader is driving reverse
TWEAK rework park destination:
- MP synchronized
- on dedi server trailers, attachments, etc. can now also be assigned parking spaces
- all destinations handled now internally in vehicles.xml in tag AutoDriveVehicleData parkDestination, AD will update automatical
TWEAK debug road network:
- performance optimisation, especial when deactivating route network debug
- changed: known markers for open / dead route ends now named with "1..."
- new: route network with connections AD might not use due to issues named "2...", i.e. reverse section (light blue) within one-way direction (green)
TWEAK reset AD modes if started should fix/avoid unusual behaviour(s)
TWEAK: CP interface for co-operation with newer CP versions
ADDED: combine open pipe when precall-level is reached
ADDED experimental features:
- blue Line Route Finder: default OFF, enable if AD could not find a route via multiple passes dark blue connections, feedback if issues occure
- detect Gras Field: default ON, harvester will detect gras field and assign the correct side to unloader
  • Loading branch information
Iwan1803 authored May 9, 2021
2 parents b348211 + 3393b76 commit f4bc5f9
Show file tree
Hide file tree
Showing 50 changed files with 2,052 additions and 588 deletions.
10 changes: 9 additions & 1 deletion FS19_AutoDrive/gui/userSettingsPage.xml
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,14 @@
<GuiElement type="bitmap" profile="multiTextOptionSettingsBg" />
<GuiElement type="bitmap" profile="baseReference" screenAlign="topLeft" position="5px 4px" size="17px 17px" />
</GuiElement>
<!-- <GuiElement type="multiTextOption" profile="multiTextOptionSettings" onCreate="onCreateAutoDriveSetting" onClick="onOptionChange" name="combineCPADHudMouse" toolTipElementId="ingameMenuHelpBoxText"> -->
<!-- <GuiElement type="button" profile="multiTextOptionSettingsLeft" /> -->
<!-- <GuiElement type="button" profile="multiTextOptionSettingsRight" /> -->
<!-- <GuiElement type="text" profile="multiTextOptionSettingsText" /> -->
<!-- <GuiElement type="text" profile="multiTextOptionSettingsTitle" position="27px 6px" /> -->
<!-- <GuiElement type="bitmap" profile="multiTextOptionSettingsBg" /> -->
<!-- <GuiElement type="bitmap" profile="baseReference" screenAlign="topLeft" position="5px 4px" size="17px 17px" /> -->
<!-- </GuiElement> -->
</GuiElement>
</GuiElement>

Expand All @@ -105,4 +113,4 @@
<GuiElement type="text" profile="ingameMenuHelpRowText" id="ingameMenuHelpBoxText" onTextChanged="onIngameMenuHelpTextChanged" />
</GuiElement>
</GuiElement>
</GUI>
</GUI>
244 changes: 97 additions & 147 deletions FS19_AutoDrive/modDesc.xml

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions FS19_AutoDrive/register.lua
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,10 @@ source(Utils.getFilename("scripts/Settings.lua", g_currentModDirectory))
source(Utils.getFilename("scripts/Gui.lua", g_currentModDirectory))
source(Utils.getFilename("scripts/Hud.lua", g_currentModDirectory))
source(Utils.getFilename("scripts/DijkstraLive.lua", g_currentModDirectory))
source(Utils.getFilename("scripts/DijkstraLiveBlue.lua", g_currentModDirectory))
source(Utils.getFilename("scripts/ExternalInterface.lua", g_currentModDirectory))
source(Utils.getFilename("scripts/PathCalculation.lua", g_currentModDirectory))
source(Utils.getFilename("scripts/TelemetryExport.lua", g_currentModDirectory))

source(Utils.getFilename("scripts/Hud/GenericHudElement.lua", g_currentModDirectory))
source(Utils.getFilename("scripts/Hud/HudButton.lua", g_currentModDirectory))
Expand Down
17 changes: 15 additions & 2 deletions FS19_AutoDrive/scripts/AutoDrive.lua
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
AutoDrive = {}
AutoDrive.version = "1.1.0.8"
AutoDrive.version = "1.1.1.0"

AutoDrive.directory = g_currentModDirectory

Expand All @@ -9,7 +9,10 @@ g_autoDriveDebugUIFilename = AutoDrive.directory .. "textures/gui_debug_Icons.dd
AutoDrive.experimentalFeatures = {}
AutoDrive.experimentalFeatures.redLinePosition = false
AutoDrive.experimentalFeatures.dynamicChaseDistance = false
AutoDrive.experimentalFeatures.telemetryOutput = false
AutoDrive.experimentalFeatures.enableRoutesManagerOnDediServer = false
AutoDrive.experimentalFeatures.blueLineRouteFinder = false
AutoDrive.experimentalFeatures.detectGrasField = true

AutoDrive.smootherDriving = true
AutoDrive.developmentControls = false
Expand Down Expand Up @@ -92,6 +95,7 @@ AutoDrive.actions = {
{"AD_continue", false, 3},
{"ADParkVehicle", false, 0},
{"AD_devAction", false, 0}
-- {"COURSEPLAY_MOUSEACTION_SECONDARY", true, 1}
}

function AutoDrive:onAllModsLoaded()
Expand Down Expand Up @@ -151,6 +155,7 @@ g_logManager:info("[AD] Start register later loaded mods end")
FSBaseMission.saveSavegame = Utils.appendedFunction(FSBaseMission.saveSavegame, AutoDrive.saveSavegame)

LoadTrigger.onActivateObject = Utils.overwrittenFunction(LoadTrigger.onActivateObject, AutoDrive.onActivateObject)
AIDriveStrategyCombine.getDriveData = Utils.overwrittenFunction(AIDriveStrategyCombine.getDriveData, AutoDrive.getDriveData)
LoadTrigger.getIsActivatable = Utils.overwrittenFunction(LoadTrigger.getIsActivatable, AutoDrive.getIsActivatable)
LoadTrigger.onFillTypeSelection = Utils.overwrittenFunction(LoadTrigger.onFillTypeSelection, AutoDrive.onFillTypeSelection)

Expand All @@ -177,6 +182,8 @@ g_logManager:info("[AD] Start register later loaded mods end")
ADScheduler:load()
ADInputManager:load()
ADMultipleTargetsManager:load()

AutoDrive.initTelemetry()
end

function AutoDrive:init()
Expand Down Expand Up @@ -218,14 +225,15 @@ end

function AutoDrive:deleteMap()
-- this function is called even befor the game is compeltely started in case you insert a wrong password for mp game, so we need to check that "mapHotspotsBuffer" and "unRegisterDestinationListener" are not nil
if g_dedicatedServerInfo == nil and AutoDrive.mapHotspotsBuffer ~= nil then
if AutoDrive.mapHotspotsBuffer ~= nil then
-- Removing and deleting all map hotspots
for _, mh in pairs(AutoDrive.mapHotspotsBuffer) do
g_currentMission:removeMapHotspot(mh)
mh:delete()
end
end
AutoDrive.mapHotspotsBuffer = {}
AutoDrive.mapHotspotsBuffer = nil

if (AutoDrive.unRegisterDestinationListener ~= nil) then
AutoDrive:unRegisterDestinationListener(AutoDrive)
Expand Down Expand Up @@ -279,6 +287,9 @@ function AutoDrive:update(dt)
if AutoDrive.isFirstRun == nil then
AutoDrive.isFirstRun = false
self:init()
if AutoDrive.devAutoDriveInit ~= nil then
AutoDrive.devAutoDriveInit()
end
end

if AutoDrive.getDebugChannelIsSet(AutoDrive.DC_NETWORKINFO) then
Expand All @@ -304,6 +315,8 @@ function AutoDrive:update(dt)
ADMessagesManager:update(dt)
ADTriggerManager:update(dt)
ADRoutesManager:update(dt)

AutoDrive.handleTelemetry(dt)
end

function AutoDrive:draw()
Expand Down
9 changes: 7 additions & 2 deletions FS19_AutoDrive/scripts/DijkstraLive.lua
Original file line number Diff line number Diff line change
Expand Up @@ -308,9 +308,14 @@ return values:
3. table with waypoints from start_id to target_id including start_id and target_id
]]
function AutoDrive:dijkstraLiveShortestPath(start_id, target_id)

if AutoDrive.experimentalFeatures.blueLineRouteFinder == true then
return AutoDrive:dijkstraLiveBlueShortestPath(start_id, target_id)
end

if ADGraphManager:hasChanges() then
AutoDrive.checkWaypointsLinkedtothemselve(true) -- find WP linked to themselve, with parameter true issues will be fixed
AutoDrive.checkWaypointsMultipleSameOut(true) -- find WP with multiple same out ID, with parameter true issues will be fixed
AutoDrive.checkWaypointsLinkedtothemselve(true) -- find WP linked to themselve, with parameter true issues will be fixed
AutoDrive.checkWaypointsMultipleSameOut(true) -- find WP with multiple same out ID, with parameter true issues will be fixed
ADGraphManager:resetChanges()
end

Expand Down
Loading

0 comments on commit f4bc5f9

Please sign in to comment.