Page 1 of 1

One more quirk: routine CalculateHolding

Posted: Tue Aug 08, 2006 8:12 am
by Merk
"mobile" is an alias attribute for "worn". If you are carrying something which is mobile (i.e, you could drag it with a rope, but maybe you can carry it too), then its size isn't going to be added to player.holding in the CalculateHolding routine.

It looks like it would be easy enough to fix by adding a check to see if the "worn" item is also "clothing":

Code: Select all

if i is not worn or i is not clothing or obj ~= player

Posted: Tue Aug 08, 2006 1:31 pm
by Kent
Again, I'll have to look through the logic of this, but if it stands up, it should probably become a fix.

Thanks.

--Kent

Posted: Tue Aug 08, 2006 8:40 pm
by Merk
The only thing I can see it breaking is if somebody was flagged something as "worn" even though it wasn't wearable, and was counting on it to not be calculated in the player's holding value. But (a) that's probably unlikely, since it has to be "clothing" unless it's forced to "worn" in code (grammar def wouldn't allow it), and (b) it's really only an issue if you're managing inventory, which is unpopular anyway. :)

Posted: Sat Feb 02, 2013 12:17 am
by Roody_Yogurt
In case anyone see this topic while forum spelunking, we have since decided the line should be:

Code: Select all

if not (i is worn and i is clothing and obj = player)

Posted: Sat Feb 02, 2013 1:38 pm
by Roody_Yogurt
Nevermind, the original code up there also works fine. I just copied it wrong for Roodylib.