DavidGriffith / inform6lib

The Inform6 interactive fiction standard library (moved to https://gitlab.com/DavidGriffith/inform6lib)
Other
22 stars 9 forks source link

After rule not being called after putting an object into a container #21

Closed DavidGriffith closed 8 years ago

DavidGriffith commented 8 years ago

The After rule not being called when putting an object into a container

Constant Story "INSERTION RULES";
Constant Headline "^An Interactive Bug Reproduction^";

Include "Parser";
Include "VerbLib";

Object Start_Room "Somewhere",
  with description "You're not sure where you are.",
  has light;

Object -> packing_case "packing case"
  with name 'packing' 'case',
       before [;
           Receive: print "[packing_case: before: Receive]^";
       ],
       after [;
           Receive: print "[packing_case: after: Receive]^";
       ],
  has static container openable open;

Object -> rock "rock"
  with name 'rock',
       before [;
           Insert: print "[rock: before: Insert]^";
       ],
       after [;
           Insert: print "[rock: after: Insert]^";
       ];

[ Initialise;
  location = Start_Room;
];

Include "Grammar";

Gameplay:

Start of a transcript of

INSERTION RULES
An Interactive Bug Reproduction
Release 1 / Serial number 151226 / Inform v6.33 Library 6/12-beta1 S
Standard interpreter 1.0 (1F) / Library serial number 140724

>take rock
Taken.

>put rock in case
[rock: before: Insert]
[packing_case: before: Receive]
[packing_case: after: Receive]
You put the rock into the packing case.

>script off

End of transcript.
DavidGriffith commented 8 years ago

http://inform7.com/mantis/view.php?id=1806