Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

[bin/crypt] can examine something in the car

  • Loading branch information...
commit 4c6b7f1d52b17cb0b633fe56660ef91c68cf684c 1 parent a309abb
Carl Mäsak authored

Showing 1 changed file with 12 additions and 1 deletion. Show diff stats Hide diff stats

  1. 13  bin/crypt
13  bin/crypt
@@ -574,7 +574,7 @@ class Adventure::Engine {
574 574
             unless defined $!player_location;
575 575
 
576 576
         die X::Adventure::NoSuchThingHere.new(:$thing)
577  
-            unless (%!thing_rooms{$thing} // '') eq $!player_location;
  577
+            unless self!is_thing_in($thing, $!player_location);
578 578
 
579 579
         die X::Adventure::NoSuchThingHere.new(:$thing)
580 580
             if %!hidden_things{$thing};
@@ -1784,6 +1784,17 @@ multi MAIN('test') {
1784 1784
             'taking the flashlight from the car (-) car not open';
1785 1785
     }
1786 1786
 
  1787
+    {
  1788
+        my $game = Crypt::Game.new();
  1789
+
  1790
+        $game.open('car');
  1791
+        is $game.examine('flashlight'),
  1792
+            Adventure::PlayerExamined.new(
  1793
+                :thing<flashlight>,
  1794
+            ),
  1795
+            'examining the flashlight in the car';
  1796
+    }
  1797
+
1787 1798
     done;
1788 1799
 }
1789 1800
 

0 notes on commit 4c6b7f1

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