fix(pulje): review v1.50 — egne tømmevogne virkede ikke under høst (global 'implement'), hentning kan afbrydes (høst slut/Stop/spiller), hjemtur ved tømmevogns-fejl, marksilo-lån kan ikke hænge i 'henter' (tidsgrænse, spiller, fejl i start), ingen ekstra parkeringstur med puljevogn, Stop holder en bar mark; regressionstest for fejlagtige globale (v1.50.1.0)

This commit is contained in:
2026-09-28 19:02:28 +02:00
parent 6f46bb543a
commit 5a2701fc62
11 changed files with 123 additions and 14 deletions
+9
View File
@@ -89,5 +89,14 @@ check("hjem: to trin", #home, 2); check("hjem: redskab først", home[1], 4); che
check("hjem: uden redskab kun traktor", #H.homeRoute({}, 2), 1)
check("hjem: samme parkering to gange tæller én", #H.homeRoute({4, 4}, 2), 2)
check("hjem: uden traktorparkering", #H.homeRoute({4}, nil), 1)
-- afbrydelse: et hente-job kan annulleres (Stop alt, høst slut, spilleren overtager)
ADFieldWork = ADFieldWork or {startAd = function() end}
Logging = Logging or {info = function() end, warning = function() end}
local stubEnv = {ADGraphManager = {getMapMarkerByWayPointId = function() return {name = "Connect X"} end}, AutoDrive = {MODE_DRIVETO = 1}}
local tractorStub = {getFullName = function() return "T" end, stopAutoDrive = function(v) v.stopped = true end}
H.fetch(stubEnv, tractorStub, 9, function() end)
check("annullér: job fandtes", H.cancel(tractorStub), true)
check("annullér: AD stoppet", tractorStub.stopped, true)
check("annullér: intet job tilbage", H.cancel(tractorStub), false)
print(failures == 0 and "\nALLE TESTS OK" or ("\n" .. failures .. " FEJL"))
os.exit(failures == 0 and 0 or 1)