I have a few invisible objects in the player’s inventory to make the parsing of a few abstract things easier. In the standard inventory (not overlayed with an own one) these invisible objects take up an empty line, like this:
You are carrying:
some stuff
some more stuff
How can I delete these empty lines? I tried “invent [; rtrue;],”, and even some fiddling with @get_cursor and @set_cursor, but to no avail.
Hm. It doesn’t in my case. The handbook says “On once being picked up, a concealed object ceases to be concealed.” I move the objects into the player at the beginning of the game, and even if I “give (them) concealed” after the move, they’re still being listed.
As a fallback option I could probably overlay the standard inventory routine with an own one, but to avoid follow-up problems I’d really like to settle this smoothly.
Maybe something with an Invisible_Item class to make it easy to declare which items don’t show in the inventory, then let c_style = “”; in that class’s invent property to take care of the line returns…
Class Invisible_Item
with
invent [;
if (inventory_stage == 1 && self in player) {
c_style = "";
rtrue;
};
],
;
Object -> Gem "gem" class Invisible_Item
with
name "gem" "diamond",
description [;
print "OOoooOooOOo! SHINY! Put that in your pocket and speak not of it!^";
],
;
Looks like I’m too late, but here’s a way to do it without fiddling in I6.
[code]Arena is a room.
A thing can be insubstantial.
A rock is here. A map is here.
conceptual metaphor is here. conceptual metaphor is insubstantial.
A temp box is a container.
Before taking inventory:
repeat with item running through things enclosed by the player:
if item is insubstantial:
move item to temp box.
Last report taking inventory:
if something is in temp box:
repeat with item running through things in temp box:
move item to the player.
[/code]