X-Git-Url: https://jxself.org/git/?p=ibg.git;a=blobdiff_plain;f=chapters%2F13.rst;fp=chapters%2F13.rst;h=4acabcd1b184cf202dc82e850b1b4c51c529cfb4;hp=a36a32bdf96224ce908e7738802ecbd0a0390a35;hb=8009937904cf79341a9c23c9c5e7b541606bfcb6;hpb=9f5abf3a7762275e6ae1f1a29c6594994ba07e2c diff --git a/chapters/13.rst b/chapters/13.rst index a36a32b..4acabcd 100644 --- a/chapters/13.rst +++ b/chapters/13.rst @@ -22,6 +22,8 @@ Additional catering garnish We must not forget a couple of tiny details in the café room: +.. include:: /config/typethis.rst + .. code-block:: inform Object food "Benny's snacks" cafe @@ -45,6 +47,8 @@ We must not forget a couple of tiny details in the café room: And a not-so-trivial object: +.. include:: /config/typethis.rst + .. code-block:: inform Object coffee "cup of coffee" benny @@ -120,6 +124,8 @@ bogged down with details of the room's function or plumbing. There's not a lot about the toilet room and its contents, though there will be some tricky side effects: +.. include:: /config/typethis.rst + .. code-block:: inform Room toilet "Unisex toilet" @@ -195,6 +201,8 @@ will enable us to tell you about Inform's default behaviour when there's no light to see by. However, let's define first the light switch mentioned in the room's description to aid players in their dressing duties. +.. include:: /config/typethis.rst + .. code-block:: inform Appliance light_switch "light switch" toilet @@ -330,6 +338,8 @@ surroundings -- at least until the player decides to close the door. So perhaps it would be a good idea to append a little code to the door object to account for this. A couple of lines in the after property will suffice: +.. include:: /config/typethis.rst + .. code-block:: inform after [ ks; @@ -540,6 +550,8 @@ that the player has picked up at one time in the game; :attr:`scenery` and :attr:`moved`. Here is the reworked ``InScope`` routine. There are a couple of new concepts to look at: +.. include:: /config/typethis.rst + .. code-block:: inform [ InScope person item; @@ -603,6 +615,8 @@ Amazing techicolour dreamcoats This leaves us the clothing items themselves, which will require a few tailored actions. Let's see first the ordinary garments of John Covarth: +.. include:: /config/typethis.rst + .. code-block:: inform Object clothes "your clothes" @@ -708,6 +722,8 @@ change into the hero's suit, after which we'll prevent a change back into ordinary clothes. So now we are dealing with a Captain Fate in full costume: +.. include:: /config/typethis.rst + .. code-block:: inform Object costume "your costume" @@ -749,6 +765,8 @@ All the objects of our game are defined. Now we must add a couple of lines to the ``Initialise`` routine to make sure that the player does not start the game naked: +.. include:: /config/typethis.rst + .. code-block:: inform [ Initialise; @@ -812,6 +830,8 @@ Therefore, we must define a ``DeathMessage`` routine as we did in "William Tell", to write our customised messages and assign them to :var:`deadflag` values greater than 2. +.. include:: /config/typethis.rst + .. code-block:: inform [ DeathMessage; @@ -826,6 +846,8 @@ Finally, we need to extend the existing grammar, to allow for a couple of things. We have already seen that we need a verb CHANGE. We'll make it really simple: +.. include:: /config/typethis.rst + .. code-block:: inform [ ChangeSub; @@ -893,6 +915,8 @@ is perhaps not a major deficiency in our game, but it takes very little to allow Benny to use his default line for *any* undefined input from the player. We need to extend the existing ASK grammar: +.. include:: /config/typethis.rst + .. code-block:: inform Extend 'ask'