1
0
Fork 0
mirror of https://github.com/ganelson/inform.git synced 2024-07-03 07:24:58 +03:00

Merge pull request #25 from zedlopez/cant_eat_other_peoples_food_patch

patch to can't eat other people's food rule
This commit is contained in:
Graham Nelson 2022-05-03 11:17:26 +01:00 committed by GitHub
commit 16ed0ae717
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -529,10 +529,14 @@ Check an actor eating (this is the can't eat clothing without removing it first
if the actor is wearing the noun, stop the action.
Check an actor eating (this is the can't eat other people's food rule):
if the noun is enclosed by a person (called the owner) who is not the actor:
if the actor is the player:
say "[The owner] [might not appreciate] that." (A);
stop the action.
if the actor does not hold the noun and the noun is enclosed by a person:
let the owner be the holder of the noun;
while the owner is not a person:
now the owner is the holder of the owner;
if the owner is not the actor:
if the actor is the player and the action is not silent:
say "[The owner] [might not appreciate] that." (A);
stop the action;
Check an actor eating (this is the can't eat portable food without carrying it rule):
if the noun is portable and the actor is not carrying the noun: