lt_value is set too late for list_together
I'm using library 6.12.6.
The way I read DM4, I should be able to write a list_together routine which prints all information on all the objects in the group when called with inventory_stage=1.
lt_value is set on line 420 of verblib.h. This is after calling the list_together routine with inventory_stage=1. Due to this, NextEntry() does not work as described, and it keeps returning objects after the last it should have returned.
An example game, which demostrates this:
Constant Story "List Together";
Constant Headline "^A demonstration of list_together.^";
Statusline score;
Include "parser";
Include "verblib";
Include "grammar";
Class Stone
with
list_together [ _obj;
if(inventory_stage == 1) {
print "a bunch of stonez (";
for(_obj=parser_one: _obj ~= 0: _obj = NextEntry(_obj, parser_two)) {
if(_obj ~= parser_one) print ", ";
print (address) (_obj.&name-->0);
}
print ")";
if(c_style & NEWLINE_BIT)
new_line;
rtrue;
}
];
Object StoneShop "The Stone Shop"
with
description "You are in a stone shop."
has light;
Stone -> BlackStone "black stone"
with
name 'black' 'stone';
Stone -> PurpleStone "purple stone"
with
name 'purple' 'stone';
Stone -> RedStone "red stone"
with
name 'red' 'stone';
Object -> Flower "flower"
with
name 'flower';
Object -> Hat "hat"
with
name 'hat';
[Initialise; ! i;
location = StoneShop;
print "^^And so the story begins...^^";
];