Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

[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 July 29, 2012

Showing 1 changed file with 4 additions and 2 deletions. Show diff stats Hide diff stats

  1. 6  bin/crypt
6  bin/crypt
@@ -536,13 +536,15 @@ class Adventure::Engine {
536 536
     method !explicit_things_at($location) {
537 537
         sub here_visible_and_explicit($_) {
538 538
             %!thing_rooms{$_} eq $location
539  
-                && !%!hidden_things{$_} && !%!implicit_things{$_}
  539
+                && !%!hidden_things{$_}
  540
+                && ($location ~~ /^contents':'/ || !%!implicit_things{$_})
540 541
         }
541 542
 
542 543
         return unless $location;
543 544
         return gather for %!thing_rooms.keys -> $thing {
544 545
             next unless here_visible_and_explicit($thing);
545  
-            if %!open_things{$thing} && self!contents_of($thing) {
  546
+            if (!%!openable_things{$thing} || %!open_things{$thing})
  547
+                && self!contents_of($thing) {
546 548
                 take $thing => self!explicit_things_at("contents:$thing");
547 549
             }
548 550
             else {

0 notes on commit f1219e1

Please sign in to comment.
Something went wrong with that request. Please try again.