Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

[bin/crypt] can examine something in the car

  • Loading branch information...
commit 4c6b7f1d52b17cb0b633fe56660ef91c68cf684c 1 parent a309abb
Carl Mäsak authored
Showing with 12 additions and 1 deletion.
  1. +12 −1 bin/crypt
13 bin/crypt
View
@@ -574,7 +574,7 @@ class Adventure::Engine {
unless defined $!player_location;
die X::Adventure::NoSuchThingHere.new(:$thing)
- unless (%!thing_rooms{$thing} // '') eq $!player_location;
+ unless self!is_thing_in($thing, $!player_location);
die X::Adventure::NoSuchThingHere.new(:$thing)
if %!hidden_things{$thing};
@@ -1784,6 +1784,17 @@ multi MAIN('test') {
'taking the flashlight from the car (-) car not open';
}
+ {
+ my $game = Crypt::Game.new();
+
+ $game.open('car');
+ is $game.examine('flashlight'),
+ Adventure::PlayerExamined.new(
+ :thing<flashlight>,
+ ),
+ 'examining the flashlight in the car';
+ }
+
done;
}
Please sign in to comment.
Something went wrong with that request. Please try again.