NNOUS Posted Sunday at 02:33 AM Share Posted Sunday at 02:33 AM (edited) 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 Sunday at 02:57 AM by NNOUS Link to comment https://forums.kleientertainment.com/forums/topic/172368-inventory-active-item-rpcs-takeput-directions-are-not-symmetric/ Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now