Show
Ignore:
Timestamp:
02/08/08 02:44:39 (11 months ago)
Author:
eevee
Message:

Database refactoring. Renamed columns and tables to be more consistent and more readable. (#58)

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • veekun/trunk/templates/dex/common.tt

    r393 r406  
    1515 
    1616[%# creates most of the columns in the move table %] 
    17 [% MACRO move_cells(moveid) BLOCK %][%# moveid %] 
    18 [%     type = MoveData.$moveid.type %] 
     17[% MACRO move_cells(move_id) BLOCK %] 
     18[%     type = MoveData.$move_id.type %] 
    1919[%     type_bg = (type == '?????') ? 'none' : type %] 
    20 [%     power = MoveData.$moveid.power %] 
    21 [%     kind = MoveData.$moveid.kind %] 
     20[%     power = MoveData.$move_id.power %] 
     21[%     kind = MoveData.$move_id.kind %] 
    2222[%     IF power == 1 %] 
    2323[%         power = 'varies' %] 
     
    2525[%         power = '--' %] 
    2626[%     END %] 
    27     <td class="name"> <a href="[% dex_uri('moves', MoveData.$moveid.name) %]">[% MoveData.$moveid.name %]</a> </td> 
     27    <td class="name"> <a href="[% dex_uri('moves', MoveData.$move_id.name) %]">[% MoveData.$move_id.name %]</a> </td> 
    2828[%     IF type == '?????' %] 
    2929    <td class="type"><img src="/dex-images/gameui/iiam.png" alt="?????" title="?????"/></td> 
     
    3131    <td class="type">[% type_name(type) %]</td> 
    3232[%     END %] 
    33     <td class="type"> <img src="/dex-images/gameui/[% MoveData.$moveid.class %].png" alt="[% MoveData.$moveid.class %]" title="[% MoveData.$moveid.class %]"/> </td> 
    34     <td class="pp"> [% MoveData.$moveid.pp %] </td> <td class="power"> [% power %] </td> <td class="acc"> [% MoveData.$moveid.acc %]%</td> <td class="priority"> [% MoveData.$moveid.priority || '' %]</td> 
    35     <td class="blurb"> [% MoveData.$moveid.blurb %] </td> 
     33    <td class="type"> <img src="/dex-images/gameui/[% MoveData.$move_id.class %].png" alt="[% MoveData.$move_id.class %]" title="[% MoveData.$move_id.class %]"/> </td> 
     34    <td class="pp"> [% MoveData.$move_id.pp %] </td> <td class="power"> [% power %] </td> <td class="acc"> [% MoveData.$move_id.accuracy %]%</td> <td class="priority"> [% MoveData.$move_id.priority || '' %]</td> 
     35    <td class="blurb"> [% MoveData.$move_id.blurb %] </td> 
    3636[%+ END %] 
    3737 
     
    4444[%# creates most of the columns in the move table %] 
    4545[% MACRO contest_cells(move) BLOCK %] 
    46 [%     moveid = move.id %] 
    47 [%     power = MoveData.$moveid.power %] 
    48 [%     kind = MoveData.$moveid.kind %] 
     46[%     move_id = move.id %] 
     47[%     power = MoveData.$move_id.power %] 
     48[%     kind = MoveData.$move_id.kind %] 
    4949[%     IF power < 2 %] 
    5050[%         FOREACH flag IN PowerLabels %] 
     
    5353[%         SET power = '?! (error!)' IF !power %] 
    5454[%     END %] 
    55     <td> <a href="[% dex_uri('moves', MoveData.$moveid.name) %]">[% MoveData.$moveid.name %]</a> </td> 
    56     <td class="type"><img src="/dex-images/gameui/[% move.contype %].png" alt="[% move.contype %]" title="[% move.contype %]"/></td> 
     55    <td> <a href="[% dex_uri('moves', MoveData.$move_id.name) %]">[% MoveData.$move_id.name %]</a> </td> 
     56    <td class="type"><img src="/dex-images/gameui/[% move.contest_type %].png" alt="[% move.contest_type %]" title="[% move.contest_type %]"/></td> 
    5757    <td class="contest"> 
    5858        [% move.contest.appeal %] 
     
    8585    <td class="type"> [% type_name(pokemon.type2) IF pokemon.type2 %] </td> 
    8686    </td> 
    87     <td class="gender">[% gender_text(pokemon.gender, 1) %]</td> 
     87    <td class="gender">[% gender_text(pokemon.gender_rate, 1) %]</td> 
    8888    <td class="breeds"> 
    8989[%     FOREACH b IN pokemon.breeds %]