Jump to content

Recommended Posts

Put direction — supports holding + incremental:

  • Inventory:AddOneOfActiveItemToSlot(slot) (components/inventory.lua:2208) and AddAllOfActiveItemToSlot operate when the active (cursor) item is non-nil — they merge from the cursor onto the slot stack. You can call them repeatedly to stream items one-by-one without needing to know the current count.

Take direction — empty-cursor only, no increment:

  • Inventory:TakeActiveItemFromCountOfSlot(slot, count) (components/inventory.lua:2174) is hard-guarded by self:GetActiveItem() == nil (line 2176). It does nothing if anything is already on the cursor.
  • TakeActiveItemFromAllOfSlot / ...FromHalfOfSlot have the same GetActiveItem() == nil guard.
  • There is no TakeOneOfSlotToActiveItem / "add N from slot onto the existing cursor stack" — the mirror of AddOneOfActiveItemToSlot simply doesn't exist.

 

 

 

ONLY fix Klei need to do its fix Inventory:TakeActiveItemFromCountOfSlot(slot, count) 

that support to add 1 (of the same) item to curser then all the asymmetric problem is fixed 

Edited by NNOUS

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
  • Create New...