Re: [TADS] Moving stuf again...


Sun, 10 Dec 1995 09:28:29 -0500

On 10 Dec 1995 12:55:20 GMT, nkg@grid.direct.ca (Neil K. Guy) wrote:
> Nice and simple code. Just a warning about all such code, though. I used
>a somewhat similar function once (though needlessly more baroque, of course)
>and didn't include any property checks for isworn and isfixed properties.
>Naturally this caused immense problems, as supposedly fixed items got
>moved around when they shouldn't have been.

I just checked adv.t's clothingItem and it's moveInto property
automatically sets isworn to nil. That's part of the reason for using
moveInto... it's supposed to know all the things necessary to move the
specific object in question.

And if this is doing nothing but dumping the contents of an object, one
would figure that there won't be any fixed objects to be moved. (Unless
you start using it to move objects from one room to another or something
like that. It's possible, I guess. The fixeditem doesn't change
moveInto at all, so yes, if a fixeditem was in the object in question
it'd get moved freely. If this possiblity exists, adding a simple
"if ( not l[i].isfixed ) { l[i].moveInto( to ); }"
would take care of it. Add an else if an error message is necessary.

--
Carl (ravenpub@southwind.net)
* It's only a hobby ... only a hobby ... only a