feat: kontrakter uden AutoDrive-net køres af spillets hjælper (1.62.210)
This commit is contained in:
@@ -87,7 +87,11 @@ local function sellPlaceableOf(mission)
|
||||
if placeable == nil and uniqueId ~= nil and g_currentMission.placeableSystem.getPlaceableByUniqueId ~= nil then
|
||||
placeable, where = g_currentMission.placeableSystem:getPlaceableByUniqueId(uniqueId), "sellingStationPlaceableUniqueId"
|
||||
end
|
||||
return placeable, where
|
||||
-- aflæsningsstationen selv (til spillets hjælper / Courseplay "Giants unload")
|
||||
if station == nil and placeable ~= nil and placeable.spec_sellingStation ~= nil then
|
||||
station = placeable.spec_sellingStation.sellingStation
|
||||
end
|
||||
return placeable, where, station
|
||||
end
|
||||
|
||||
-- AutoDrive-markører hvis aflæsning hører til salgsstedet.
|
||||
@@ -132,9 +136,11 @@ local function start(adEnv, entry)
|
||||
plan = {mode = "auto", sow = entry.stage == "sowing", sowFruit = entry.fruit or "", straw = "chop"}}
|
||||
if harvest and entry.mission ~= nil then
|
||||
-- høst: læssene skal til kontraktens salgssted (ADFieldWork.chooseStore)
|
||||
local placeable, where = sellPlaceableOf(entry.mission)
|
||||
local placeable, where, station = sellPlaceableOf(entry.mission)
|
||||
local farmId = g_currentMission:getFarmId()
|
||||
changes.contractSellIds = placeable ~= nil and sellMarkerIds(adEnv, placeable, farmId) or {}
|
||||
-- uden AutoDrive-vej kører spillets hjælper læssene hertil (ADFieldWork beginUnloader)
|
||||
changes.contractStation = station
|
||||
ADFieldJobs.log(entry.fieldId, "høstkontrakt: salgssted %s (fundet via %s), %d AutoDrive-markør(er) ved det",
|
||||
placeable ~= nil and tostring(placeable.getName ~= nil and placeable:getName() or "?") or "ikke fundet",
|
||||
tostring(where), #changes.contractSellIds)
|
||||
|
||||
Reference in New Issue
Block a user