Inform - Resources - Examples

Back to List

Inventory
Complete

Backward
Forward

Plain
Coloured
Gaudy

This code
in plain text

Browsing Toyshop.inf

Satchel (lines 57-84)

057  ! >SA  Ungenerously, the player can only carry at most 4 things, but there's
058  !      a satchel to carry other things around in...
059  ! ----------------------------------------------------------------------------
060   
061  Constant MAX_CARRIED = 4;
062  Constant SACK_OBJECT = satchel;
063   
064  Object satchel "satchel"
065    with description "Big and with a smile painted on it.",
066         name "satchel", article "your",
067         when_closed "Your satchel lies on the floor.",
068         when_open "Your satchel lies open on the floor.",
069    has  container open openable;
070   
071  !   We're going to use the most elaborate scoring system the
072  !   library provides (even though we're going to make the six tasks all
073  !   score only 1 point each), so we define all this...
074   
075  Constant TASKS_PROVIDED;
076  Constant NUMBER_TASKS = 6;
077  Array    task_scores  -> 1 1 1 1 1 1;
078  Constant MAX_SCORE = 6;
079   
080  !   And include the library of standard verbs and actions.
081   
082  Include "VerbLib";
083   
084  ! ----------------------------------------------------------------------------


Last updated 23 June 2004. This web site has not been fully supported since April 2008. Information may be out of date. This page was originally managed by Graham Nelson (graham@gnelson.demon.co.uk) assisted by C Knight.