Create your own Interactive Fiction

ADRIFT - Interactive Fiction  
Home   |   News ADRIFT News RSS   |   Screenshots   |   Download   |   Games ADRIFT Reviews RSS   |   Forum   |   Help   |   Links
Welcome Guest Register | Login
Popular Games
Pete's Punkin Junkinator
Skybreak v. 1.4
The Sisters
Synonymizer
Notebook Demo
The Makeshift Magician
Escape to New York v1.1
Ectocomp 2009
Hold Breath
Okt. 31
 
Latest Forum Posts
Constellaris Court
Happy birthday reelyor
New Game Uploaded: THINGS THAT GO BUMP IN THE NIGHT
Dominion of Darkness - interactive story of the Dark Lord/Lady
Belated happy birthday saabie!
Object groups?
Happy birthday Denk & Andrew
InsideADRIFT Back Issues
Hi everyone
EctoComp 2025 RESULTS ARE UP!
 
Latest Reviews
DRAM 321 Final
Goldilocks is a FOX!
Xanix - Xixon Resurgence
Finn's Big Adventure
Bug Hunt On Menelaus
Magor Investigates...
Classic Adventure
Private Eye
Roozden's Color Code Module
Wumpus Hunt

Make a donation

Cursor  Problem with item function %object%.Contents

Issue Type: Status: Priority: Date Submitted: Votes:
Bug Open High Sat 19th Dec 2015 3 votes Vote Up Vote Down
 
Found in version: Last Updated: Completed in version: Date Completed: Track Changes:
5.0.34.1 Sat 19th Dec 2015 Log In
 
saabieSat 19th Dec 2015 01:51
This function returns the keys of all of the objects and characters inside of a container object, and can be used with the .Count and .List functions to print the number of objects and what they are.

The first problem is that it includes static objects which are "part of" the objects and characters.
It is very unlikely that anyone would want to count or list a characters eyes or the cover of a book as separate objects.

The second problem is an incompatability with the .List function.
If this container contains 2 pens and a box which itself contains another 2 pens then %object%.Contents.List will print:
"Inside the bag are 7 objects: the blue pen, the red pen, the silver box. Inside the silver box are a purple pen and a green pen, the purple pen, the pentop, the green pen and the silver latch"
The list function by default prints the contents of the silver box, but because the Contents function is also listing them, they get printed twice.

The .Contents function should only return the items directly inside the object, leaving it to the List function to list the items nested inside those objects.

For those occasions when it is useful to get the keys of everything the player is carrying, an option similar to that used for ".List" can be used. eg: .Contents(True)
But the "part of" objects should still NOT be included.
 
ElliotMSat 19th Dec 2015 03:10
Good testing, Saabie.

For reference, the original discussion was posted in this thread: http://forum.adrift.co/viewtopic.php?f=14&t=11346&p=100673
© 2013 Campbell Wild. All rights reserved. | Contact the Webmaster