Resetting the printed name

Hello,

Once I have set a different name as the printed name of a thing, how can I “reset” it, so that it is printed again as the actual name?

Let’s say that a magical scroll is in a room. When the room description is listed, instead of the scroll’s Inform name, I want the scroll to appear as “a scroll.”

[code]A scroll is a kind of thing. The printed name of a scroll is “scroll.” A scroll can be checked or unchecked.

The Cave is a room.

The Levitate scroll is a scroll in the cave.
[/code]

Now, initially, the Levitate scroll is “unchecked,” so it will appear as “a scroll.” Once I examine it (or cast “read magic” or whatever), the scroll becomes “checked” and I want the original name to appear: Levitate scroll. How do I do it?

It is not stored anywhere except that property, so once you overwrite it it’s gone.

There are several ways to do what you want. You could write:

Rule for printing the name of an unchecked scroll:
	say "scroll".

You could give each scroll a spell-identity property (a kind of value: levitate, fireball, etc) and then print that when desired.

Yes, I thought about “some text called spell-identity” -I just wasn’t sure if there was a way to print the original name.

But, yeah, the “Rule for printing…” will do to job, thanks!