You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When a craft is started, this does not remove the ingredients from the player's inventory (bug!). When the craft is finished, however, the products are correctly added to the inventory.
The text was updated successfully, but these errors were encountered:
looks like the inventory_changed message only outputs positive, but not negative changes. this needs to be fixed in the luamod.
However, additionally, these item removals must be attributed to a task/actionid, so the claim can be removed...
Alternatively, the claim is removed once the craft is submitted.
But how to deal with items being removed, while still being claimed? Should the claim persist (possible problem: code will think more is available that it's the case) or be removed (problem: which claim is to be removed? probably the lowest-priority claim first)
probably, there should be a periodic or on-change full inventory update (not a diff). To make this work with pending actions, the bot needs to track two inventories:
the confirmed, but old inventory (representing the last full inventory update from the game)
the extrapolated inventory that already incorporates negative changes that are submitted but not confirmed yet.
if an action is submitted, it's registered as pending action. The extrapolated inventory is updated, if the action removed items.
if an action is confirmed, the timestamp is registered.
if a full inventory update is received, the extrapolated inventory is updated by using that update plus all submitted-but-not-confirmed actions.
Implementation: all actions can define arbitrary states, ranging from "submitted" over "started" to "finished" and have a method returning their inventory change when at that state.
When a craft is started, this does not remove the ingredients from the player's inventory (bug!). When the craft is finished, however, the products are correctly added to the inventory.
The text was updated successfully, but these errors were encountered: