Does cloning an object clone it's children as well?

Enpherdaen
04 Oct 2017, 16:49Hi
hegemonkhan
04 Oct 2017, 17:35this is a good question...
'deep copying' vs 'shallow copying'
http://www.cs.utexas.edu/~scottm/cs307/handouts/deepCopying.htm (no idea how good this link is - briefly looked at it only, just google search: deep vs shallow copying, if you want to look for better links)
// or (I am using an old apple computer and browser, so it can't handle the 'https / secure http' url usage, argh), so here's the normal/secure (shttp) link of it for everyone with a modern computer/browser, lol:
https://www.cs.utexas.edu/~scottm/cs307/handouts/deepCopying.htm
does quest automatically do 'deep copying' without you having to manually do it (you just do 'shallow copying', but underneath quest actually does 'deep copying') or do you have to manually do 'deep vs shallow' copying ???
see the other thread on this:
http://textadventures.co.uk/forum/quest/topic/muyzncmskuamclqqeiqw9w/cloning-a-room-contents
as it already has some content/posts
mrangel
04 Oct 2017, 18:07The short answer: Yes.
Be more careful about exits, though. Exits come in pairs, one exit in each direction, and an exit is considered to be "in" the room it comes from. So cloning a room will create duplicates of the outbound exits, but not the ones going back in.
(So I'm going to loop through a room's contents moving all exits and key items somewhere else, clone the room, and then put all the stuff back)

Enpherdaen
04 Oct 2017, 18:45Thanks guys.