Show
Ignore:
Timestamp:
12/30/07 01:49:43 (13 months ago)
Author:
eevee
Message:

Location map is reborn. (#228)
Threw in some minor addenda regarding D/P file layout.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • veekun/trunk/lib/Vee/Controller/Dex.pm

    r393 r394  
    723723} 
    724724 
    725 =head2 map 
    726  
    727 =cut 
    728  
    729 sub map : Chained('pokemon_chain') : Args(0) { 
    730     my ($self, $c) = @_; 
    731     my $s = $c->stash; 
    732      
    733     my $poke = $c->req->captures->[0]; 
    734     my $gen = 'dp';  # TODO: CHEAP HACK PLZ MAKE THIS WORK RITE -- do by generation but split if versions disagree? 
    735  
    736     my $row = get_row($c, 'Pokemon', $poke); 
    737     $c->vee_abort('There is no such Pokémon ', $poke, '.  If you are messing with my URLs, please stop.  If you came here via a link, please inform its owner that it is invalid.') unless $row; 
    738  
    739     $s->{encounters} = get_locations($row); 
    740     $s->{location_coords} = { 
    741         map { $_->name => $_->coordinates } 
    742             $c->model('DBIC::Locations')->search(undef) 
    743     }; 
    744  
    745     $s->{this} = $row; 
    746  
    747     $s->{page_title} = $row->name . ' - Location Map'; 
    748     $s->{crumbs}     = [ 
    749         '<a href="' . $c->uri('Dex') . '">Pok&eacute;dex</a>', 
    750         '<a href="' . $c->uri('Dex', 'pokemon_list') . '">Pok&eacute;mon</a>', 
    751         '<a href="' . $c->uri('Dex', 'pokemon', lc $row->name) . '">' . $row->name . '</a>', 
    752         'Location Map', 
    753     ]; 
    754  
    755     $s->{template} = 'dex/page/pokemon/map.tt'; 
    756 } 
    757  
    758725################################################################################ 
    759726 
     
    14201387        if ($node->{param}) { 
    14211388            $node->{blurb} .= ", or use $node->{param}"; 
    1422             $node->{item} = $1 eq 'day' ? 'gameui/day' : 'gameui/night'; 
     1389            $node->{item} = $1 eq 'day' ? 'gameui/daytime' : 'gameui/night'; 
    14231390        } 
    14241391