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 @@
|
||||
-- hvilke varer rummer/producerer den, hvor meget, og hvordan tages paller ud af et
|
||||
-- objektlager. Spil-adapter — de rene beslutninger ligger i adOutboundPlanner.
|
||||
|
||||
-- info-log bag "Detaljeret log" (ADLog i adSettings.lua; uden ADLog — tests — direkte til Logging)
|
||||
local function logInfo(...) return (ADLog or Logging).info(...) end
|
||||
|
||||
ADSources = {}
|
||||
|
||||
-- ADCache-opslag der også virker uden adCache (tests)
|
||||
@@ -294,7 +297,7 @@ function ADSources.assignedBuilding(adEnv, wayPointId, farmId)
|
||||
local station = kind == "factory" and production ~= nil and production.loadingStation or nil
|
||||
station = station or nearestOwnedStation(placeable, wayPoint)
|
||||
if station == nil then
|
||||
Logging.info("ADSmartPickup: markør %s hører til '%s', men bygningen har ingen læssestation", tostring(wayPointId), tostring(building.name))
|
||||
logInfo("ADSmartPickup: markør %s hører til '%s', men bygningen har ingen læssestation", tostring(wayPointId), tostring(building.name))
|
||||
end
|
||||
return {kind = kind, placeable = placeable, station = station, wayPointId = wayPointId}
|
||||
end
|
||||
@@ -456,7 +459,7 @@ local function getPalletsNearSpawner(placeable, fillType, farmId, spawner)
|
||||
local now = g_currentMission ~= nil and g_currentMission.time or nil
|
||||
if count == 0 and lost > 0 and now ~= nil and (ADSources.lastPalletNote[placeable] or -math.huge) + 60000 < now then
|
||||
ADSources.lastPalletNote[placeable] = now
|
||||
Logging.info(ADSources.LOG_PREFIX .. "%s: %d paller inden for %d m tilhører nabo-spawnere (0 egne)", getPlaceableName(placeable, "?"), lost, ADSources.PALLET_RADIUS)
|
||||
logInfo(ADSources.LOG_PREFIX .. "%s: %d paller inden for %d m tilhører nabo-spawnere (0 egne)", getPlaceableName(placeable, "?"), lost, ADSources.PALLET_RADIUS)
|
||||
end
|
||||
return total, count, fullTotal, fullCount
|
||||
end
|
||||
@@ -885,7 +888,7 @@ function ADSources.logSellMarkers(entries)
|
||||
if loggedSellMarkers[station] ~= text then
|
||||
loggedSellMarkers[station] = text
|
||||
if Logging ~= nil and Logging.info ~= nil then
|
||||
Logging.info("ADSmartPickup: salgssted '%s' -> %s", key, text)
|
||||
logInfo("ADSmartPickup: salgssted '%s' -> %s", key, text)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user