chore: ModHub-forberedelse — MIT-licens, AutoDrive-afhængighed, beskrivelse EN/DE/DA, multiplayer fra, Detaljeret log
This commit is contained in:
@@ -3,6 +3,9 @@
|
||||
-- nærmeste lager/købestation med varen, og omdirigering når stedet er løbet tørt.
|
||||
-- Funktionerne ligger på ADFieldWork, så kaldere og tests er uændrede. Indlæses efter adFieldWork.lua.
|
||||
|
||||
-- info-log bag "Detaljeret log" (ADLog i adSettings.lua; uden ADLog — tests — direkte til Logging)
|
||||
local function logInfo(...) return (ADLog or Logging).info(...) end
|
||||
|
||||
local function log(...) ADFieldJobs.log(...) end
|
||||
local function now() return ADFieldJobs.now end
|
||||
local function startAd(...) return ADFieldWork.startAd(...) end
|
||||
@@ -314,7 +317,7 @@ local function markerAtStation(adEnv, vehicle, station, placeable, fillType)
|
||||
local name = placeable ~= nil and placeable.getName ~= nil and placeable:getName() or "?"
|
||||
local goods = fillType ~= nil and g_fillTypeManager ~= nil and g_fillTypeManager.getFillTypeNameByIndex ~= nil
|
||||
and g_fillTypeManager:getFillTypeNameByIndex(fillType) or nil
|
||||
Logging.info("ADSmartPickup: påfyldning: station '%s' -> markør '%s' (trin %s%s)", tostring(name),
|
||||
logInfo("ADSmartPickup: påfyldning: station '%s' -> markør '%s' (trin %s%s)", tostring(name),
|
||||
tostring(marker ~= nil and marker.name or id), tostring(step), goods ~= nil and (", " .. tostring(goods)) or "")
|
||||
end
|
||||
end)
|
||||
@@ -432,7 +435,7 @@ function ADFieldWork.retargetEmptyRefill(adEnv, vehicle)
|
||||
startAd(adEnv, vehicle, adEnv.AutoDrive.MODE_LOAD, first.id, right, fillType)
|
||||
local marker = adEnv.ADGraphManager:getMapMarkerByWayPointId(right)
|
||||
local name = g_fillTypeManager ~= nil and g_fillTypeManager:getFillTypeNameByIndex(fillType) or tostring(fillType)
|
||||
Logging.info("ADSmartPickup: påfyldning: '%s' fik intet %s ved %s — kører til %s", tostring(ADRuns.vehicleLabel(vehicle)),
|
||||
logInfo("ADSmartPickup: påfyldning: '%s' fik intet %s ved %s — kører til %s", tostring(ADRuns.vehicleLabel(vehicle)),
|
||||
tostring(name), tostring(second.name), tostring(marker ~= nil and marker.name or right))
|
||||
return true
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user