Part 6 - Inventory Management
Inventory listing style is a kind of value. The inventory listing styles are tall and wide. Current inventory listing style is an inventory listing style that varies.
This is the new inventory rule:
if the current game is Dracula begin;
say "Llevo conmigo:[br][if the player carries nothing and the player wears nothing]Nada en absoluto.[br][end if]";
otherwise;
issue library message taking inventory action number 2;
say ":";
follow the display inventory rule;
say "[br]";
end if;
The new inventory rule is listed instead of the print standard inventory rule in the carry out taking inventory rules.
Understand "inventory [inventory listing style]" as requesting styled inventory. Requesting styled inventory is an action applying to an inventory listing style.
Carry out requesting styled inventory:
now current inventory listing style is the inventory listing style understood.
Report requesting styled inventory:
say "Inventory listing is now set to [current inventory listing style]."
This is the display inventory rule:
if the current inventory listing style is tall begin;
list the contents of the player, with newlines, indented, including contents,
giving inventory information, with extra indentation;
otherwise;
list the contents of the player, giving inventory information, as a sentence, including contents;
end if;