summaryrefslogtreecommitdiff
path: root/db/animations.php
blob: f69d169779650cdca613cf422d57edbe5f502986 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
<?php

$animations = [];
foreach (scandir(dirname(__DIR__) . '/modules/tuxemon/mods/tuxemon/animations/technique') as $file) {
  if (in_array($file, ['.', '..'])) continue;

  $animationFileName = pathinfo($file, PATHINFO_FILENAME);
  $animationName = substr($animationFileName, 0, -3);

  $animations[$animationName][] = $animationFileName;
}

file_put_contents(__DIR__ . '/_generated/animations.json', json_encode($animations));