goto-bus-stop / recanalyst

Analyzes Age of Empires 2 recorded game files.
https://goto-bus-stop.github.io/recanalyst/doc/v4.2.0
GNU General Public License v3.0
75 stars 11 forks source link

Two thing in src/Model/GameSettings.php #56

Open lichifeng opened 6 years ago

lichifeng commented 6 years ago

In src/Model/GameSettings.php :

1. line 162-170

    /**
     * Returns game speed string.
     *
     * @return string
     */
    public function gameSpeedName()
    {
        return $this->rec->trans('game_speeds', $this->gameSpeed);
    }

$this->gameSpeed could be one of 100, 150, 200, but corresponding array in translation file is:

  'game_speeds' => 
  array (
    0 => 'Slow',
    1 => 'Normal',
    2 => 'Fast',
  ),

I resolved the problem by changing 0, 1, 2 to 100, 150, 200 .

2. line 140-150

/**
     * Returns map style string.
     *
     * @return string
     */
    public function mapStyleName()
    {
        $mapStyle = $this->rec->getResourcePack()
            ->getMapStyle($this->mapId);
        return $this->rec->trans('map_styles', $mapStyle);
    }

Funtion getMapStyle() in this snippet of code seems doesn't exist at all?

Thanks.

lichifeng commented 6 years ago

0.0 More bugs were found, a lot of them.

I won't issue any more, now learning to use pull request, maybe a better approach to support this project.