Granger wrote:You created this with OO technology?
Nope. :) I am utterly unconvinced by Simula-style OO.
Granger wrote:do you have at least some kind of ID which describes the idea of an apple (which stays with the object)?
There are two possible things that could
at all be considered an ID of an object: The sprite, and the ID for locating the code which takes care of deserializing an object from its on-disk save-format. Both would work for extremely simple things like apples, of course, but break down with more complex objects. The sprite can both vary within the same kind of object/item (as for e.g. road signs or tree-planting pots) as well as potentially being the same between different objects/items. The same thing goes for the persistence ID as well, though in different ways. For instance, kilns, baking ovens, ore smelters and finery forges are all deserialized by the same function. The same goes for all kinds of crime clues, and for some other stuff as well. Not to mention the fact that there's nothing to display that ID with.
Apart from those, objects/items have no type. They do have various predicates they can satisfy, however. The crafting and building systems ask an item if it is an apple, a string, some common metal, if it is a container containing at least an amount of some substance, or something else entirely.