[DGD] Copying objects in DGD

Michael Bergbauer dgd at noname.franken.de
Sat Jan 11 14:07:51 CET 2003


On Sat Jan 11, 2003 at 06:2410AM -0500, Jamin Vander Berg wrote
> I've looked through the docs that I can find, but I can't figure out 
> if its possible to make a copy of an object. That is, supposing an 
> object's data values have changed since it was first cloned and 
> created, is it possible to make a "replica" object. I am trying to 
> make a "multiple item" inheritable, in which if you only "get", for 
> example, 50 out of 100 of an item laying on the ground (all 100 are 1 
> object), the object must be cloned, moved to the player, and set to 
> 50, while the old object would be reduced to 50. However, if, for any 
> reason, the data values of the first object have changed since 
> creation, simply cloning the same object would be inaccurate. Trying 
> to figure out if this is possible. Until then, I'm just putting in 
> the clone code.

We have something in Geas that behaves just like your specification, 
and I'm sorry to tell you, but when we do a split, we're cloning the new 
object, and afterwards, we're copying all necessary data elements to the 
new object. So far, I don't know of a better way to do that job.

-- 
Michael Bergbauer <michael at noname.franken.de>
use your idle CPU cycles - See http://www.distributed.net for details.
Visit our mud Geas at geas.franken.de Port 3333
_________________________________________________________________
List config page:  http://list.imaginary.com/mailman/listinfo/dgd



More information about the DGD mailing list