Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

[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
Carl Mäsak authored July 17, 2012

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

  1. 10  bin/crypt
10  bin/crypt
@@ -459,10 +459,10 @@ class Adventure::Engine {
459 459
         self!apply_and_return: @events;
460 460
     }
461 461
 
462  
-    method !explicit_things_here {
  462
+    method !explicit_things_at($location) {
463 463
         return unless $!player_location;
464 464
         sub is_here_and_explicit($_) {
465  
-            %!thing_rooms{$_} eq $!player_location && !%!implicit_things{$_}
  465
+            %!thing_rooms{$_} eq $location && !%!implicit_things{$_}
466 466
         }
467 467
         return %!thing_rooms.keys.grep(&is_here_and_explicit);
468 468
     }
@@ -491,7 +491,7 @@ class Adventure::Engine {
491 491
             @events.push(Adventure::PlayerLooked.new(
492 492
                 :room($to),
493 493
                 :exits((%!exits{$to} // ()).keys),
494  
-                :things(self!explicit_things_here),
  494
+                :things(self!explicit_things_at($to)),
495 495
             ));
496 496
         }
497 497
         self!apply_and_return: @events;
@@ -504,7 +504,7 @@ class Adventure::Engine {
504 504
         my @events = Adventure::PlayerLooked.new(
505 505
             :room($!player_location),
506 506
             :exits((%!exits{$!player_location} // ()).keys),
507  
-            :things(self!explicit_things_here),
  507
+            :things(self!explicit_things_at($!player_location)),
508 508
         );
509 509
         self!apply_and_return: @events;
510 510
     }
@@ -515,7 +515,7 @@ class Adventure::Engine {
515 515
             @events.push(Adventure::PlayerLooked.new(
516 516
                 :room($in),
517 517
                 :exits((%!exits{$in} // ()).keys),
518  
-                :things(self!explicit_things_here),
  518
+                :things(self!explicit_things_at($in)),
519 519
             ));
520 520
         }
521 521
         self!apply_and_return: @events;

0 notes on commit fd3ee8c

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