Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

[bin/crypt] two subtle thing fixes

* A thing is visible inside of a container not only if the
  container is open, but also if it's *not openable* (i.e. always
  open).

* Implicit things should be listed if they have been placed in
  containers. For example, the water in the helmet.
  • Loading branch information...
commit f1219e1c1ca8ad49099e4656c76d7377a900ffff 1 parent 48e2a6f
Carl Mäsak authored
Showing with 4 additions and 2 deletions.
  1. +4 −2 bin/crypt
6 bin/crypt
View
@@ -536,13 +536,15 @@ class Adventure::Engine {
method !explicit_things_at($location) {
sub here_visible_and_explicit($_) {
%!thing_rooms{$_} eq $location
- && !%!hidden_things{$_} && !%!implicit_things{$_}
+ && !%!hidden_things{$_}
+ && ($location ~~ /^contents':'/ || !%!implicit_things{$_})
}
return unless $location;
return gather for %!thing_rooms.keys -> $thing {
next unless here_visible_and_explicit($thing);
- if %!open_things{$thing} && self!contents_of($thing) {
+ if (!%!openable_things{$thing} || %!open_things{$thing})
+ && self!contents_of($thing) {
take $thing => self!explicit_things_at("contents:$thing");
}
else {
Please sign in to comment.
Something went wrong with that request. Please try again.