Sha256: 1b6bfc7e74f53247847e3001730aa68d9c3fd044ea27492702b8d72f4e1b7768

Contents?: true

Size: 643 Bytes

Versions: 1

Compression:

Stored size: 643 Bytes

Contents

respond :drop_in, Query::Children.new(), Query::Reachable.new() do |actor, thing, target|
  puts "You can't put #{the thing} inside #{the target}."
end

respond :drop_in, Query::Children.new(), Query::Reachable.new(Container) do |actor, thing, container|
  if container.is? :closed
    actor.tell "#{The container} is closed."
  else
    thing.parent = container
    thing.is :contained
    actor.tell "You put #{the thing} in #{the container}."
  end
end

xlate "drop :item in :container", :drop_in, :item, :container
xlate "put :item in :container", :drop_in, :item, :container
xlate "place :item in :container", :drop_in, :item, :container

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
gamefic-0.2.0 lib/gamefic/import/basics/actions/drop-in.rb