Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

[bin/crypt] fixed lagging location bug

This thinko occurs because I assume that the event has been applied already,
but it hasn't. Second time I make such a thinko. Interesting.
  • Loading branch information...
commit fd3ee8ce59c858f6ef3972741997a38a3c20d967 1 parent 4eab8bb
@masak authored
Showing with 5 additions and 5 deletions.
  1. +5 −5 bin/crypt
View
10 bin/crypt
@@ -459,10 +459,10 @@ class Adventure::Engine {
self!apply_and_return: @events;
}
- method !explicit_things_here {
+ method !explicit_things_at($location) {
return unless $!player_location;
sub is_here_and_explicit($_) {
- %!thing_rooms{$_} eq $!player_location && !%!implicit_things{$_}
+ %!thing_rooms{$_} eq $location && !%!implicit_things{$_}
}
return %!thing_rooms.keys.grep(&is_here_and_explicit);
}
@@ -491,7 +491,7 @@ class Adventure::Engine {
@events.push(Adventure::PlayerLooked.new(
:room($to),
:exits((%!exits{$to} // ()).keys),
- :things(self!explicit_things_here),
+ :things(self!explicit_things_at($to)),
));
}
self!apply_and_return: @events;
@@ -504,7 +504,7 @@ class Adventure::Engine {
my @events = Adventure::PlayerLooked.new(
:room($!player_location),
:exits((%!exits{$!player_location} // ()).keys),
- :things(self!explicit_things_here),
+ :things(self!explicit_things_at($!player_location)),
);
self!apply_and_return: @events;
}
@@ -515,7 +515,7 @@ class Adventure::Engine {
@events.push(Adventure::PlayerLooked.new(
:room($in),
:exits((%!exits{$in} // ()).keys),
- :things(self!explicit_things_here),
+ :things(self!explicit_things_at($in)),
));
}
self!apply_and_return: @events;
Please sign in to comment.
Something went wrong with that request. Please try again.