ralphmerridew

Inform 7 std. library insert

Jul 7th, 2011
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.15 KB | None | 0 0
  1. Inserting it into is an action applying to two things.
  2. The inserting it into action translates into I6 as "Insert".
  3.  
  4. The specification of the inserting it into action is "By this action, an actor puts
  5. something he is holding into a container: for instance, putting a coin into a
  6. collection box."
  7.  
  8. Check an actor inserting something into (this is the convert insert to drop where
  9. possible rule):
  10. if the second noun is down or the actor is in the second noun,
  11. convert to the dropping action on the noun.
  12.  
  13. Check an actor inserting something into (this is the can't insert what's not held rule):
  14. if the actor is carrying the noun, continue the action;
  15. if the actor is wearing the noun, continue the action;
  16. issue miscellaneous library message number 26 for the noun;
  17. silently try the actor taking the noun;
  18. if the actor is carrying the noun, continue the action;
  19. stop the action.
  20.  
  21. Check an actor inserting something into (this is the can't insert something into itself rule):
  22. let the noun-CPC be the component parts core of the noun;
  23. let the second-CPC be the component parts core of the second noun;
  24. let the transfer ceiling be the common ancestor of the noun-CPC with the second-CPC;
  25. if the transfer ceiling is the noun-CPC,
  26. stop the action with library message inserting it into action number 5 for
  27. the noun.
  28.  
  29. Check an actor inserting something into (this is the can't insert into closed containers rule):
  30. if the second noun is a closed container,
  31. stop the action with library message inserting it into action number 3 for
  32. the second noun.
  33.  
  34. Check an actor inserting something into (this is the can't insert into what's not a
  35. container rule):
  36. if the second noun is not a container,
  37. stop the action with library message inserting it into action number 2 for
  38. the second noun.
  39.  
  40. Check an actor inserting something into (this is the can't insert clothes being worn rule):
  41. if the actor is wearing the noun:
  42. issue library message inserting it into action number 6 for the noun;
  43. silently try the actor trying taking off the noun;
  44. if the actor is wearing the noun, stop the action;
  45.  
  46. Check an actor inserting something into (this is the can't insert if this exceeds
  47. carrying capacity rule):
  48. if the second noun provides the property carrying capacity:
  49. if the number of things in the second noun is at least the carrying capacity
  50. of the second noun,
  51. stop the action with library message inserting it into action number 7 for the second noun;
  52.  
  53. Carry out an actor inserting something into (this is the standard inserting rule):
  54. now the noun is in the second noun.
  55.  
  56. Report an actor inserting something into (this is the concise report inserting rule):
  57. if the actor is the player and the I6 parser is running multiple actions,
  58. stop the action with library message inserting it into action number 8
  59. for the noun;
  60. otherwise continue the action.
  61.  
  62. Report an actor inserting something into (this is the standard report inserting rule):
  63. if the actor is the player, issue library message inserting it into action
  64. number 9 for the noun;
  65. otherwise issue actor-based library message inserting it into action number 10 for the noun.
Add Comment
Please, Sign In to add comment