If you drop an item onto a characters stat-bars, then it does an auto-put-away and drops the item somewhere onto that characters inventory.
And if the character has a container in their inventory, then the item can wind up in that container.
But I've just noticed that if the latter occurs, then the character's carry weight isn't recalculated until something else triggers it.
Inventory weight glitch
Moderator: Sophia
Forum rules
Please read the Forum rules and policies before posting.
Please read the Forum rules and policies before posting.
- Sophia
- Concise and Honest
- Posts: 4240
- Joined: Thu Sep 12, 2002 9:50 pm
- Location: Nowhere in particular
- Contact:
Re: Inventory weight glitch
This should be pretty easy to fix, although admittedly also not super high priority.
Re: Inventory weight glitch
Yep, not exactly game breaking 8-)
On a related note, is there any way to detect when a container gets an item added to it? I can do it fine in the subrenderer, but I couldn't find anything triggered by the aforementioned auto-put-away...
And similarly, is there a better way to detect closing a subrenderer than repeatedly sending a delayed message in one subrenderer frame and cancelling it in the next?
thanks
On a related note, is there any way to detect when a container gets an item added to it? I can do it fine in the subrenderer, but I couldn't find anything triggered by the aforementioned auto-put-away...
And similarly, is there a better way to detect closing a subrenderer than repeatedly sending a delayed message in one subrenderer frame and cancelling it in the next?
thanks
Friends don't let friends eat worm round
- Sophia
- Concise and Honest
- Posts: 4240
- Joined: Thu Sep 12, 2002 9:50 pm
- Location: Nowhere in particular
- Contact:
Re: Inventory weight glitch
The load bug has been fixed.
You might do better hooking into the underlying event that causes the subrenderer to stop being drawn: after_from_r_hand for something taken out of the right hand, and the newly added on_unlook when the eye stops looking.
You may or may not have been aware of inst_incoming, which is a member function that goes on a container arch and takes the id of any incoming inst. This already worked for subrenderers but I fixed it so that an auto-put-away triggered it as well.
Subrenderers don't maintain any state information; they render when the object is in hand or being looked at, and they don't when it isn't. It's good enough for DM so I don't really want to change it.
You might do better hooking into the underlying event that causes the subrenderer to stop being drawn: after_from_r_hand for something taken out of the right hand, and the newly added on_unlook when the eye stops looking.
Re: Inventory weight glitch
Nice, thanks!
I was about to ask whether "newly added" meant on_unlook was in the currect or next version. Then I saw the 0.81 post 8-)
I was about to ask whether "newly added" meant on_unlook was in the currect or next version. Then I saw the 0.81 post 8-)
Friends don't let friends eat worm round