LootManagerHandle

Group
manager
Methods
4
Fields
None

Getting one

manager:newLoot(…)

Methods

MethodReturnsDescription
run()(RunStatus, string?)Advance one tick: finish what is in flight, or decide what is next and act on it. It tries again when an action did not take, and drops a t…
plan()LootDecisionWhat it would do next, without doing it.
step()LootStepThe step it is on, for a status line.
reset()()Forget what is in flight. The config stays.

Returned by

MethodReturnsDescription
Manager.newLootLootManagerHandleA looter for config. It reads no game state, and a config it cannot use raises here.

Method details

run

run: (LootManagerHandle) -> (RunStatus, string?)

Advance one tick: finish what is in flight, or decide what is next and act on it. It tries again when an action did not take, and drops a take whose pile has gone.

local status, reason = loot:run()
Returns
"running" when it acted or is waiting, or "idle" with nothing to do, the reason being a LootWaitReason when it deferred and nil when there is simply nothing to loot.