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
Skybreak v. 1.4
Skybreak v 1.2
The Fortress of Fear
Lost Coastlines
the virtual human
The Lost Labyrinth of Lazaitch
Starship Quest
The Dwarf of Direwood Forest
Jacaranda Jim
Classic Adventure
 
Latest Forum Posts
Preventing character property being executed?
ParserComp 2024 site is up
HAPPY BIRTDAY RoozdenScoot!
Copyright limitations?
Search Function Not Working In Windows 11
errors
Forum site error
The Book of Jax - The Adventures of Alaric Blackmoon # 10
HAPPY BIRTHDAY DazaKiwi
HAPPY BIRTHDAY ralphmerridew
 
Latest Reviews
Xanix - Xixon Resurgence
Finn's Big Adventure
Bug Hunt On Menelaus
Magor Investigates...
Classic Adventure
Private Eye
Roozden's Color Code Module
Wumpus Hunt
Lost Coastlines
The Lost Labyrinth of Lazaitch

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