One more quirk: routine CalculateHolding

Post a reply


This question is a means of preventing automated form submissions by spambots.
Smilies
:smile: :sad: :eek: :shock: :cool: :-x :razz: :oops: :evil: :twisted: :wink: :idea: :arrow: :neutral: :mrgreen:

BBCode is ON
[img] is ON
[url] is ON
Smilies are ON

Topic review
   

Expand view Topic review: One more quirk: routine CalculateHolding

by Roody_Yogurt » Sat Feb 02, 2013 1:38 pm

Nevermind, the original code up there also works fine. I just copied it wrong for Roodylib.

by Roody_Yogurt » Sat Feb 02, 2013 12:17 am

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)

by Merk » Tue Aug 08, 2006 8:40 pm

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. :)

by Kent » Tue Aug 08, 2006 1:31 pm

Again, I'll have to look through the logic of this, but if it stands up, it should probably become a fix.

Thanks.

--Kent

One more quirk: routine CalculateHolding

by Merk » Tue Aug 08, 2006 8:12 am

"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

Top