ALTTP_BASE_ROM=
ALTTP_DOORS_CLI=
-AOS_BASE_ROM=
-AOS_CLI=
-AOS_HOSTNAME=aos.localhorst.tv
-AOS_SURGE_URL=https://aosrando.surge.sh
-AOS_URL=https://aos.localhorst.tv
-
TWITCH_CLIENT_ID=
TWITCH_CLIENT_SECRET=
TWITCH_REDIRECT_URI=
namespace App\Console\Commands;
-use App\DiscordAppCommands\AosrPresetCommand;
use App\Models\DiscordBotCommand as CommandModel;
use App\Models\DiscordChannel;
use App\Models\DiscordGuild;
//AosrPresetCommand::listen($discord);
}
if (config('discord.create_commands')) {
- AosrPresetCommand::delete($discord);
+ //AosrPresetCommand::delete($discord);
}
});
$discord->on(Event::GUILD_CREATE, function (Guild $guild, Discord $discord) {
+++ /dev/null
-<?php
-
-namespace App\Console\Commands;
-
-use App\Beat\Encoder;
-use App\Models\AosSeed;
-use Illuminate\Console\Command;
-use Illuminate\Support\Facades\Storage;
-use Symfony\Component\Process\Process;
-
-class GenerateAosSeed extends Command
-{
- /**
- * The name and signature of the console command.
- *
- * @var string
- */
- protected $signature = 'aos:generate {id}';
-
- /**
- * The console command description.
- *
- * @var string
- */
- protected $description = 'Generate AoS seed';
-
- /**
- * Execute the console command.
- *
- * @return int
- */
- public function handle()
- {
- $seed = AosSeed::findOrFail($this->argument('id'));
- $seed->status = 'generating';
- $seed->error_detail = null;
- $seed->save();
-
- $stage = 'initial';
- try {
- $temp_dir = sys_get_temp_dir();
-
- $params = array_merge(['seed' => $seed->seed], $seed->settings);
- $settings = http_build_query($params, '', '&');
-
- $romFile = $temp_dir.'/'.$seed->hash.'.gba';
- $spoilerFile = $temp_dir.'/'.$seed->hash.'.txt';
-
- $stage = 'randomizing';
- $proc = new Process([config('aos.cli'), config('aos.base_rom'), $romFile, $settings]);
- $proc->mustRun();
-
- $stage = 'calculating patch';
- $encoder = new Encoder(file_get_contents(config('aos.base_rom')));
- $patch = $encoder->createPatch(file_get_contents($romFile));
- Storage::disk('aos-seeds')->put($seed->hash.'.bps', $patch);
- unlink($romFile);
-
- $stage = 'saving spoiler';
- Storage::disk('aos-spoilers')->put($seed->hash.'.txt', $proc->getOutput());
-
- $stage = 'done';
- $seed->status = 'generated';
- $seed->save();
- } catch (\Throwable $e) {
- $seed->status = 'error';
- $seed->error_detail = [
- 'stage' => $stage,
- 'type' => get_class($e),
- 'message' => $e->getMessage(),
- ];
- $seed->save();
- return 1;
- }
-
- return 0;
- }
-}
+++ /dev/null
-<?php
-
-namespace App\DiscordAppCommands;
-
-use App\Models\AosSeed;
-use Discord\Builders\MessageBuilder;
-use Discord\Discord;
-use Discord\Parts\Interactions\Interaction;
-
-class AosrPresetCommand {
-
- public static function create(Discord $discord) {
- $choices = [];
- foreach (static::$presets as $preset) {
- $choices[] = [
- 'name' => $preset['name'],
- 'value' => $preset['value'],
- ];
- }
- $cmd = $discord->application->commands->create([
- 'name' => 'aosr',
- 'type' => 1,
- 'description' => 'Generate an AoSRando seed.',
- 'description_localizations' => [
- 'de' => 'Generiert einen AoSRando Seed.',
- ],
- 'options' => [[
- 'name' => 'preset',
- 'description' => 'Generate an AoSRando seed from preset.',
- 'description_localizations' => [
- 'de' => 'Generiert einen AoSRando Seed anhand eines Presets.',
- ],
- 'type' => 1,
- 'options' => [[
- 'name' => 'preset',
- 'description' => 'Which preset to use',
- 'description_localizations' => [
- 'de' => 'Welches Preset genutzt werden soll.',
- ],
- 'type' => 3,
- 'required' => true,
- 'choices' => $choices,
- ], [
- 'name' => 'race',
- 'description' => 'Generate race ROM, seed will be hidden',
- 'description_localizations' => [
- 'de' => 'Race ROM generieren, Seed wird versteckt.',
- ],
- 'type' => 5,
- 'required' => false,
- ]],
- ]],
- ]);
- $discord->application->commands->save($cmd);
- }
-
- public static function delete(Discord $discord) {
- $discord->application->commands->freshen()->then(function () use ($discord) {
- $cmd = $discord->application->commands->find(function ($cmd) {
- return $cmd->name == 'aosr';
- });
- if ($cmd) {
- $discord->application->commands->delete($cmd);
- }
- });
- }
-
- public static function presetByName($name) {
- if (isset(static::$presets[$name])) {
- return static::$presets[$name];
- }
- foreach (static::$presets as $presetName => $preset) {
- if (strcasecmp($name, $presetName) === 0) {
- return $preset;
- }
- }
- return null;
- }
-
- public static function listen(Discord $discord) {
- $discord->listenCommand(['aosr', 'preset'], function(Interaction $interaction) use ($discord) {
- $interaction
- ->acknowledgeWithResponse()
- ->done(function() use($discord, $interaction) {
- $presetName = $interaction->data->options['preset']->options['preset']->value;
- $race = isset($interaction->data->options['preset']->options['race'])
- ? $interaction->data->options['preset']->options['race']->value : false;
- if (isset(static::$presets[$presetName])) {
- $preset = static::$presets[$presetName];
- $seed = AosSeed::generateSurge($presetName, $preset['settings'], $race);
-
- $process = $seed->createProcess();
- $process->on('exit', function() use ($discord, $interaction, $seed) {
- $seed = $seed->fresh();
-
- $embed = $seed->createEmbed($discord);
- $message = MessageBuilder::new();
- $message->addEmbed($embed);
-
- $interaction->updateOriginalResponse($message);
- });
-
- $process->start($discord->getLoop());
- } else {
- $message = MessageBuilder::new();
- $message->setContent('unknown preset '.$presetName);
- $interaction->updateOriginalResponse($message);
- }
- });
- return true;
- });
- }
-
- public static $presets = [
- 'Normal' => [
- 'name' => 'Normal',
- 'value' => 'Normal',
- 'settings' => [
- 'logic' => 'AreaTechTiers',
- 'nodupes' => 'false',
- 'panther' => 'Rand70Dup',
- 'area' => 'Vanilla',
- 'boss' => 'Vanilla',
- 'enemy' => 'Vanilla',
- 'itempool' => 'Standard',
- 'weight' => '2.5',
- 'grahm' => 'BookSouls',
- 'kicker' => 'false',
- 'startshop' => 'Vanilla',
- 'shopprice' => 'Vanilla',
- 'shopSouls' => 'Vanilla',
- 'levelexp' => 'Vanilla',
- 'telestart' => 'false',
- 'mapassist' => 'false',
- 'doublechaos' => 'false',
- 'reqallsouls' => 'false',
- 'noww' => 'false',
- 'palette' => 'Vanilla',
- ],
- ],
- 'Beginner' => [
- 'name' => 'Beginner',
- 'value' => 'Beginner',
- 'settings' => [
- 'logic' => 'AreaTechTiers',
- 'nodupes' => 'false',
- 'panther' => 'FirstAlways',
- 'area' => 'Vanilla',
- 'boss' => 'Vanilla',
- 'enemy' => 'Vanilla',
- 'itempool' => 'Standard',
- 'weight' => '0',
- 'grahm' => 'BookSouls',
- 'kicker' => 'false',
- 'startshop' => 'Unlocked30k',
- 'shopprice' => 'Vanilla',
- 'shopSouls' => '2PerGroup',
- 'levelexp' => 'Casual',
- 'telestart' => 'false',
- 'mapassist' => 'true',
- 'doublechaos' => 'false',
- 'reqallsouls' => 'false',
- 'noww' => 'false',
- 'palette' => 'Vanilla',
- ],
- ],
- 'SpicyNormal' => [
- 'name' => 'Spicy normal',
- 'value' => 'SpicyNormal',
- 'settings' => [
- 'logic' => 'VeryRandom',
- 'nodupes' => 'true',
- 'panther' => 'Rand70Dup',
- 'area' => 'Vanilla',
- 'boss' => 'Dead-endShuffle',
- 'enemy' => 'RandomPM20',
- 'itempool' => 'Standard',
- 'weight' => '1.5',
- 'grahm' => 'BookSouls',
- 'kicker' => 'true',
- 'startshop' => 'Unlocked30k',
- 'shopprice' => 'RandHV',
- 'shopSouls' => 'Half',
- 'levelexp' => 'Hard',
- 'telestart' => 'true',
- 'mapassist' => 'false',
- 'doublechaos' => 'false',
- 'reqallsouls' => 'false',
- 'noww' => 'false',
- 'palette' => 'Vanilla',
- ],
- ],
- 'ExtraFastNormal' => [
- 'name' => 'Extra fast normal',
- 'value' => 'ExtraFastNormal',
- 'settings' => [
- 'logic' => 'AreaTechTiers',
- 'nodupes' => 'false',
- 'panther' => 'FirstAlways',
- 'area' => 'Vanilla',
- 'boss' => 'Vanilla',
- 'enemy' => 'Vanilla',
- 'itempool' => 'Standard',
- 'weight' => '1.0',
- 'grahm' => 'NoCheck',
- 'kicker' => 'true',
- 'startshop' => 'Unlocked30k',
- 'shopprice' => 'RandHV',
- 'shopSouls' => 'Half',
- 'levelexp' => 'Vanilla',
- 'telestart' => 'true',
- 'mapassist' => 'false',
- 'doublechaos' => 'false',
- 'reqallsouls' => 'false',
- 'noww' => 'false',
- 'palette' => 'Vanilla',
- ],
- ],
- 'Area' => [
- 'name' => 'Area',
- 'value' => 'Area',
- 'settings' => [
- 'logic' => 'AreaTechTiers',
- 'nodupes' => 'false',
- 'panther' => 'Rand70Dup',
- 'area' => 'AreaRandom',
- 'boss' => 'Dead-endShuffle',
- 'enemy' => 'Vanilla',
- 'itempool' => 'Standard',
- 'weight' => '2.5',
- 'grahm' => 'BookSouls',
- 'kicker' => 'false',
- 'startshop' => 'Vanilla',
- 'shopprice' => 'Vanilla',
- 'shopSouls' => 'Vanilla',
- 'levelexp' => 'Vanilla',
- 'telestart' => 'false',
- 'mapassist' => 'false',
- 'doublechaos' => 'false',
- 'reqallsouls' => 'false',
- 'noww' => 'false',
- 'palette' => 'Vanilla',
- ],
- ],
- 'AreaBeginner' => [
- 'name' => 'Area beginner',
- 'value' => 'AreaBeginner',
- 'settings' => [
- 'logic' => 'AreaTechTiers',
- 'nodupes' => 'false',
- 'panther' => 'FirstAlways',
- 'area' => 'AreaRandom',
- 'boss' => 'Dead-endShuffle',
- 'enemy' => 'Vanilla',
- 'itempool' => 'Standard',
- 'weight' => '0',
- 'grahm' => 'BookSouls',
- 'kicker' => 'false',
- 'startshop' => 'Unlocked30k',
- 'shopprice' => 'Vanilla',
- 'shopSouls' => '2PerGroup',
- 'levelexp' => 'Casual',
- 'telestart' => 'false',
- 'mapassist' => 'true',
- 'doublechaos' => 'false',
- 'reqallsouls' => 'false',
- 'noww' => 'false',
- 'palette' => 'Vanilla',
- ],
- ],
- 'AreaSpicy' => [
- 'name' => 'Area spicy',
- 'value' => 'AreaSpicy',
- 'settings' => [
- 'logic' => 'AreaTechTiers',
- 'nodupes' => 'true',
- 'panther' => 'Rand70Dup',
- 'area' => 'AreaRandom',
- 'boss' => 'Dead-endShuffle',
- 'enemy' => 'RandomPM20',
- 'itempool' => 'Standard',
- 'weight' => '1.5',
- 'grahm' => 'BookSouls',
- 'kicker' => 'true',
- 'startshop' => 'Unlocked30k',
- 'shopprice' => 'RandHV',
- 'shopSouls' => 'Half',
- 'levelexp' => 'Hard',
- 'telestart' => 'true',
- 'mapassist' => 'false',
- 'doublechaos' => 'false',
- 'reqallsouls' => 'false',
- 'noww' => 'false',
- 'palette' => 'Vanilla',
- ],
- ],
- 'AreaAllBosses' => [
- 'name' => 'Area all bosses',
- 'value' => 'AreaAllBosses',
- 'settings' => [
- 'logic' => 'AreaTechTiers',
- 'nodupes' => 'false',
- 'panther' => 'Rand70Dup',
- 'area' => 'AreaRandom',
- 'boss' => 'Dead-endShuffle',
- 'enemy' => 'Vanilla',
- 'itempool' => 'Standard',
- 'weight' => '2.5',
- 'grahm' => 'AllBosses',
- 'kicker' => 'true',
- 'startshop' => 'Unlocked',
- 'shopprice' => 'Vanilla',
- 'shopSouls' => '2PerGroup',
- 'levelexp' => 'Vanilla',
- 'telestart' => 'false',
- 'mapassist' => 'false',
- 'doublechaos' => 'false',
- 'reqallsouls' => 'false',
- 'noww' => 'false',
- 'palette' => 'Vanilla',
- ],
- ],
- 'AreaExtraFast' => [
- 'name' => 'Area extra fast',
- 'value' => 'AreaExtraFast',
- 'settings' => [
- 'logic' => 'AreaTechTiers',
- 'nodupes' => 'false',
- 'panther' => 'FirstAlways',
- 'area' => 'AreaRandom',
- 'boss' => 'Dead-endShuffle',
- 'enemy' => 'Vanilla',
- 'itempool' => 'Standard',
- 'weight' => '1.0',
- 'grahm' => 'NoCheck',
- 'kicker' => 'true',
- 'startshop' => 'Unlocked30k',
- 'shopprice' => 'RandHV',
- 'shopSouls' => 'Half',
- 'levelexp' => 'Vanilla',
- 'telestart' => 'true',
- 'mapassist' => 'false',
- 'doublechaos' => 'false',
- 'reqallsouls' => 'false',
- 'noww' => 'false',
- 'palette' => 'Vanilla',
- ],
- ],
- 'AreaExpert' => [
- 'name' => 'Area expert',
- 'value' => 'AreaExpert',
- 'settings' => [
- 'logic' => 'AreaTechTiers',
- 'nodupes' => 'true',
- 'panther' => 'NeverExists',
- 'area' => 'AreaRandom',
- 'boss' => 'Dead-endShuffle',
- 'enemy' => 'RandomNoLimit',
- 'itempool' => 'Standard',
- 'weight' => '2.5',
- 'grahm' => 'BookSouls',
- 'kicker' => 'true',
- 'startshop' => 'Vanilla',
- 'shopprice' => 'Vanilla',
- 'shopSouls' => 'Half',
- 'levelexp' => 'Lvl1',
- 'telestart' => 'false',
- 'mapassist' => 'false',
- 'doublechaos' => 'true',
- 'reqallsouls' => 'false',
- 'noww' => 'false',
- 'palette' => 'Vanilla',
- ],
- ],
- 'AreaRequireAllSouls' => [
- 'name' => 'Area require all souls',
- 'value' => 'AreaRequireAllSouls',
- 'settings' => [
- 'logic' => 'AreaTechTiers',
- 'nodupes' => 'true',
- 'panther' => 'NeverExists',
- 'area' => 'AreaRandom',
- 'boss' => 'Dead-endShuffle',
- 'enemy' => 'RandomNoLimit',
- 'itempool' => 'Standard',
- 'weight' => '2.5',
- 'grahm' => 'BookSouls',
- 'kicker' => 'true',
- 'startshop' => 'Vanilla',
- 'shopprice' => 'Vanilla',
- 'shopSouls' => 'Half',
- 'levelexp' => 'Lvl1',
- 'telestart' => 'false',
- 'mapassist' => 'false',
- 'doublechaos' => 'true',
- 'reqallsouls' => 'true',
- 'noww' => 'false',
- 'palette' => 'Vanilla',
- ],
- ],
- 'DoorAllBossesEasy' => [
- 'name' => 'Door all bosses easy',
- 'value' => 'DoorAllBossesEasy',
- 'settings' => [
- 'logic' => 'AreaTechTiers',
- 'nodupes' => 'false',
- 'panther' => 'Rand70Dup',
- 'area' => 'DoorRandom',
- 'boss' => 'Vanilla',
- 'enemy' => 'Vanilla',
- 'itempool' => 'Standard',
- 'weight' => '0',
- 'grahm' => 'AllBosses',
- 'kicker' => 'true',
- 'startshop' => 'Unlocked',
- 'shopprice' => 'Vanilla',
- 'shopSouls' => '2PerGroup',
- 'levelexp' => 'Vanilla',
- 'telestart' => 'true',
- 'mapassist' => 'true',
- 'doublechaos' => 'false',
- 'reqallsouls' => 'false',
- 'noww' => 'false',
- 'palette' => 'Vanilla',
- ],
- ],
- 'DoorAllBosses' => [
- 'name' => 'Door all bosses',
- 'value' => 'DoorAllBosses',
- 'settings' => [
- 'logic' => 'AreaTechTiers',
- 'nodupes' => 'false',
- 'panther' => 'Rand70Dup',
- 'area' => 'DoorRandom',
- 'boss' => 'Vanilla',
- 'enemy' => 'RandomPM20',
- 'itempool' => 'Standard',
- 'weight' => '0',
- 'grahm' => 'AllBosses',
- 'kicker' => 'true',
- 'startshop' => 'Vanilla',
- 'shopprice' => 'Vanilla',
- 'shopSouls' => '2PerGroup',
- 'levelexp' => 'Vanilla',
- 'telestart' => 'false',
- 'mapassist' => 'false',
- 'doublechaos' => 'false',
- 'reqallsouls' => 'false',
- 'noww' => 'false',
- 'palette' => 'Vanilla',
- ],
- ],
- 'SGLive2020' => [
- 'name' => 'SGLive 2020',
- 'value' => 'SGLive2020',
- 'settings' => [
- 'logic' => 'AreaTechTiers',
- 'nodupes' => 'false',
- 'panther' => 'Rand70Dup',
- 'area' => 'Vanilla',
- 'boss' => 'Vanilla',
- 'enemy' => 'Vanilla',
- 'itempool' => 'Standard',
- 'weight' => '2.5',
- 'grahm' => 'BookSouls',
- 'kicker' => 'false',
- 'startshop' => 'Vanilla',
- 'shopprice' => 'Vanilla',
- 'shopSouls' => 'Vanilla',
- 'levelexp' => 'Vanilla',
- 'telestart' => 'false',
- 'mapassist' => 'false',
- 'doublechaos' => 'false',
- 'reqallsouls' => 'false',
- 'noww' => 'false',
- 'palette' => 'Vanilla',
- ],
- ],
- 'Tournament2021' => [
- 'name' => 'Tournament 2021',
- 'value' => 'Tournament2021',
- 'settings' => [
- 'logic' => 'AreaTechTiers',
- 'nodupes' => 'false',
- 'panther' => 'Rand70Dup',
- 'area' => 'AreaRandom',
- 'boss' => 'Dead-endShuffle',
- 'enemy' => 'Vanilla',
- 'itempool' => 'Standard',
- 'weight' => '2.5',
- 'grahm' => 'BookSouls',
- 'kicker' => 'false',
- 'startshop' => 'Unlocked30k',
- 'shopprice' => 'RandHV',
- 'shopSouls' => 'Half',
- 'levelexp' => 'Vanilla',
- 'telestart' => 'false',
- 'mapassist' => 'false',
- 'doublechaos' => 'false',
- 'reqallsouls' => 'false',
- 'noww' => 'false',
- 'palette' => 'Vanilla',
- ],
- ],
- 'SGLive2021' => [
- 'name' => 'SGLive 2021',
- 'value' => 'SGLive2021',
- 'settings' => [
- 'logic' => 'AreaTechTiers',
- 'nodupes' => 'false',
- 'panther' => 'FirstAlways',
- 'area' => 'AreaRandom',
- 'boss' => 'Dead-endShuffle',
- 'enemy' => 'Vanilla',
- 'itempool' => 'Standard',
- 'weight' => '2.5',
- 'grahm' => 'BookSouls',
- 'kicker' => 'false',
- 'startshop' => 'Unlocked30k',
- 'shopprice' => 'RandHV',
- 'shopSouls' => 'Half',
- 'levelexp' => 'Vanilla',
- 'telestart' => 'false',
- 'mapassist' => 'false',
- 'doublechaos' => 'false',
- 'reqallsouls' => 'false',
- 'noww' => 'false',
- 'palette' => 'Vanilla',
- ],
- ],
- 'Tournament2022' => [
- 'name' => 'Tournament 2022',
- 'value' => 'Tournament2022',
- 'settings' => [
- 'logic' => 'AreaTechTiers',
- 'nodupes' => 'false',
- 'panther' => 'FirstAlways',
- 'area' => 'AreaRandom',
- 'boss' => 'Dead-endShuffle',
- 'enemy' => 'Vanilla',
- 'itempool' => 'Standard',
- 'weight' => '2.5',
- 'grahm' => 'BookSouls',
- 'kicker' => 'false',
- 'startshop' => 'Unlocked30k',
- 'shopprice' => 'RandHV',
- 'shopSouls' => 'Half',
- 'levelexp' => 'Vanilla',
- 'telestart' => 'false',
- 'mapassist' => 'false',
- 'doublechaos' => 'false',
- 'reqallsouls' => 'false',
- 'noww' => 'false',
- 'palette' => 'Vanilla',
- ],
- ],
- ];
-
-}
+++ /dev/null
-<?php
-
-namespace App\Http\Controllers;
-
-use App\DiscordAppCommands\AosrPresetCommand;
-use App\Models\AosSeed;
-use Illuminate\Http\Request;
-use Illuminate\Support\Facades\Artisan;
-
-class AosSeedController extends Controller
-{
-
- public function byHash($hash) {
- $seed = AosSeed::where('hash', '=', $hash)->firstOrFail();
-
- if ($seed->race) {
- $seed->makeHidden('seed');
- }
- if ($seed->mystery) {
- $seed->makeHidden('settings');
- }
-
- return $seed->toJson();
- }
-
- public function generate(Request $request) {
- $validatedData = $request->validate([
- 'preset' => 'string|required',
- 'race' => 'boolean',
- ]);
- $presetName = $validatedData['preset'];
- $race = $validatedData['race'] ?? false;
-
- $preset = AosrPresetCommand::presetByName($presetName);
- if (!$preset) {
- abort(404);
- }
- $seed = AosSeed::generateSurge($preset['value'], $preset['settings'], $race);
- Artisan::call('aos:generate '.intval($seed->id));
-
- $seed = $this->censor($seed->fresh());
- return $seed->toJson();
- }
-
- public function presets() {
- return array_values(AosrPresetCommand::$presets);
- }
-
- public function retry($hash) {
- $seed = AosSeed::where('hash', '=', $hash)->firstOrFail();
-
- if ($seed->status == 'error') {
- $seed->status = 'pending';
- $seed->save();
- Artisan::call('aos:generate '.intval($seed->id));
- }
-
- $seed = $this->censor($seed->fresh());
- return $seed->toJson();
- }
-
- private function censor(AosSeed $seed) {
- if ($seed->race) {
- $seed->makeHidden('seed');
- }
- if ($seed->mystery) {
- $seed->makeHidden('settings');
- }
- return $seed;
- }
-
-}
+++ /dev/null
-<?php
-
-namespace App\Models;
-
-use App\DiscordAppCommands\AosrPresetCommand;
-use Discord\Discord;
-use Discord\Parts\Embed\Embed;
-use Discord\Parts\Embed\Field;
-use Discord\Parts\Embed\Footer;
-use Illuminate\Database\Eloquent\Factories\HasFactory;
-use Illuminate\Database\Eloquent\Model;
-use Illuminate\Support\Str;
-use React\ChildProcess\Process;
-
-class AosSeed extends Model
-{
- use HasFactory;
-
- public static function generateSurge($preset, $settings, $race = false, $mystery = false) {
- $seed = new static();
- $seed->hash = Str::random(16);
- $seed->generator = 'surge';
- $seed->preset = $preset;
- $seed->race = $race;
- $seed->mystery = $mystery;
- $seed->seed = strval(random_int(-2147483648, 2147483647));
- $seed->settings = $settings;
- $seed->status = 'pending';
- $seed->save();
- return $seed;
- }
-
- public function createProcess() {
- return new Process('php artisan aos:generate '.intval($this->id), base_path());
- }
-
- public function createEmbed(Discord $discord) {
- $preset = AosrPresetCommand::$presets[$this->preset];
-
- $fields = [
- new Field($discord, [ 'name' => 'Generator', 'value' => 'This seed has been generated with fusecv\'s randomizer on aosrando.surge.sh.' ]),
- new Field($discord, [ 'name' => 'Preset', 'value' => $preset['name'], 'inline' => true ]),
- ];
-
- if (!$this->race) {
- $fields[] = new Field($discord, [ 'name' => 'Seed', 'value' => $this->seed, 'inline' => true ]);
- }
-
- if (!$this->mystery) {
- $fields[] = new Field($discord, [ 'name' => 'Logic', 'value' => $this->settings['logic'], 'inline' => true ]);
- $fields[] = new Field($discord, [ 'name' => 'Area', 'value' => $this->settings['area'], 'inline' => true ]);
- $fields[] = new Field($discord, [ 'name' => 'Boss', 'value' => $this->settings['boss'], 'inline' => true ]);
- $fields[] = new Field($discord, [ 'name' => 'Enemy', 'value' => $this->settings['enemy'], 'inline' => true ]);
- }
-
- $fields[] = new Field($discord, [ 'name' => 'Permalink', 'value' => $this->permalink ]);
-
- return new Embed($discord, [
- 'fields' => $fields,
- 'footer' => new Footer($discord, [
- 'text' => 'Grün',
- ]),
- 'timestamp' => now(),
- 'title' => 'AoSRando Seed',
- 'type' => 'rich',
- 'url' => $this->permalink,
- ]);
- }
-
- public function getPermalinkAttribute() {
- return config('aos.url').'/h/'.rawurlencode($this->hash);
- }
-
- protected $casts = [
- 'error_detail' => 'array',
- 'mystery' => 'boolean',
- 'race' => 'boolean',
- 'settings' => 'array',
- ];
-
-}
+++ /dev/null
-<?php
-
-return [
- 'base_rom' => env('AOS_BASE_ROM', ''),
- 'cli' => env('AOS_CLI', ''),
- 'hostname' => env('AOS_HOSTNAME', 'aos.localhorst.tv'),
- 'surge_url' => env('AOS_SURGE_URL', 'https://aosrando.surge.sh'),
- 'url' => env('AOS_URL', 'https://aos.localhorst.tv'),
-];
'alttp-seeds' => [
'driver' => 'local',
'root' => storage_path('app/alttp-seeds'),
- 'url' => env('AOS_URL').'/alttp-seeds',
+ 'url' => env('APP_URL').'/alttp-seeds',
'visibility' => 'public',
],
'root' => storage_path('app/alttp-spoilers'),
],
- 'aos-seeds' => [
- 'driver' => 'local',
- 'root' => storage_path('app/aos-seeds'),
- 'url' => env('AOS_URL').'/aos-seeds',
- 'visibility' => 'public',
- ],
-
- 'aos-spoilers' => [
- 'driver' => 'local',
- 'root' => storage_path('app/aos-spoilers'),
- ],
-
'media' => [
'driver' => 'local',
'root' => storage_path('app/media'),
'links' => [
public_path('storage') => storage_path('app/public'),
public_path('alttp-seeds') => storage_path('app/alttp-seeds'),
- public_path('aos-seeds') => storage_path('app/aos-seeds'),
public_path('media') => storage_path('app/media'),
],
* or customize the JavaScript scaffolding to fit your unique needs.
*/
-import AosApp from './components/aos/App';
import App from './components/app';
-if (document.getElementById('aos-root')) {
- ReactDOM.render(<AosApp />, document.getElementById('aos-root'));
-}
-
if (document.getElementById('react-root')) {
ReactDOM.render(<App />, document.getElementById('react-root'));
}
+++ /dev/null
-import { withFormik } from 'formik';
-import PropTypes from 'prop-types';
-import React from 'react';
-import { Button, Col, Container, Form, Row } from 'react-bootstrap';
-import { withTranslation } from 'react-i18next';
-
-import i18n from '../../i18n';
-
-const settings = [
- 'logic',
- 'nodupes',
- 'panther',
- 'area',
- 'boss',
- 'enemy',
- 'itempool',
- 'weight',
- 'grahm',
- 'kicker',
- 'startshop',
- 'shopprice',
- 'shopSouls',
- 'levelexp',
- 'telestart',
- 'mapassist',
- 'doublechaos',
- 'reqallsouls',
- 'noww',
- 'palette',
-];
-
-const settingValues = {
- area: [
- 'AreaRandom',
- 'DoorRandom',
- 'Vanilla',
- ],
- boss: [
- 'Dead-endShuffle',
- 'Vanilla',
- ],
- doublechaos: [
- 'false',
- 'true',
- ],
- enemy: [
- 'RandomNoLimit',
- 'RandomP20M5',
- 'RandomP30M10',
- 'RandomPM10',
- 'RandomPM20',
- 'RandomPMaxM5',
- 'Vanilla',
- ],
- grahm: [
- 'AllBosses',
- 'BookSouls',
- 'NoCheck',
- ],
- itempool: [
- 'AllSouls',
- 'Standard',
- ],
- kicker: [
- 'false',
- 'true',
- ],
- levelexp: [
- 'Casual',
- 'Hard',
- 'Lvl1',
- 'Vanilla',
- ],
- logic: [
- 'AreaTechTiers',
- 'AreaTechTiersHard',
- 'ForwardFeed',
- 'ForwardFeedHard',
- 'HybridProgression',
- 'VeryRandom',
- 'VeryRandomHard',
- 'VeryRandomHardOnly',
- ],
- mapassist: [
- 'false',
- 'true',
- ],
- nodupes: [
- 'false',
- 'true',
- ],
- noww: [
- 'false',
- 'true',
- ],
- palette: [
- 'Mode1',
- 'Mode1.5',
- 'Mode2',
- 'Vanilla',
- ],
- panther: [
- 'AlwaysRand',
- 'ExtraFairRand',
- 'FirstAlways',
- 'NeverExists',
- 'Rand70Dup',
- ],
- reqallsouls: [
- 'false',
- 'true',
- ],
- shopprice: [
- 'RandHV',
- 'Vanilla',
- ],
- shopSouls: [
- '2PerGroup',
- 'Half',
- 'OnlySouls',
- 'Vanilla',
- ],
- startshop: [
- 'Unlocked',
- 'Unlocked30k',
- 'Vanilla',
- ],
- telestart: [
- 'false',
- 'true',
- ],
- weight: [
- '0',
- '1.0',
- '1.5',
- '2.0',
- '2.5',
- '3.0',
- '3.5',
- ],
-};
-
-const Generate = ({
- handleBlur,
- handleChange,
- handleSubmit,
- presets,
- setFieldValue,
- values,
-}) =>
-<Container>
- <h1>{i18n.t('aosGenerate.heading')}</h1>
- <Form noValidate onSubmit={handleSubmit}>
- <Row>
- <Col md={6}>
- <Form.Group controlId="generate.preset">
- <Form.Label>
- {i18n.t('aosSeeds.preset')}
- </Form.Label>
- <Form.Select
- name="preset"
- onBlur={handleBlur}
- onChange={e => {
- const presetName = e.target.value;
- const preset = presets.find(p => p.value === presetName);
- if (preset) {
- setFieldValue('settings', preset.settings);
- }
- return handleChange(e);
- }}
- value={values.preset}
- >
- <option value="custom">{i18n.t('aosSeeds.presets.custom')}</option>
- {presets.map(preset =>
- <option key={preset.value} value={preset.value}>
- {i18n.t(`aosSeeds.presets.${preset.value}`)}
- </option>
- )}
- </Form.Select>
- </Form.Group>
- </Col>
- <Col sm={6} md={3}>
- <Form.Group controlId="generate.submit">
- <Form.Label>
- {i18n.t('button.generate')}
- </Form.Label>
- <div>
- <Button type="submit">
- {i18n.t('button.generate')}
- </Button>
- </div>
- </Form.Group>
- </Col>
- </Row>
- <Row>
- {settings.map(setting =>
- <Form.Group as={Col} md={4} key={setting} controlId={`generate.${setting}`}>
- <Form.Label>
- {i18n.t(`aosSeeds.settingName.${setting}`)}
- </Form.Label>
- <Form.Select
- name={`settings[${setting}]`}
- onBlur={handleBlur}
- onChange={e => {
- setFieldValue('preset', 'custom');
- return handleChange(e);
- }}
- value={values.settings[setting]}
- >
- {settingValues[setting].map(value =>
- <option key={value} value={value}>
- {i18n.t(`aosSeeds.settingValue.${setting}.${value}`)}
- </option>
- )}
- </Form.Select>
- </Form.Group>
- )}
- </Row>
- </Form>
-</Container>;
-
-Generate.propTypes = {
- handleBlur: PropTypes.func,
- handleChange: PropTypes.func,
- handleSubmit: PropTypes.func,
- presets: PropTypes.arrayOf(PropTypes.shape({
- settings: PropTypes.shape({
- }),
- value: PropTypes.string,
- })),
- setFieldValue: PropTypes.func,
- values: PropTypes.shape({
- preset: PropTypes.string,
- settings: PropTypes.shape({
- }),
- }),
-};
-
-export default withFormik({
- displayName: 'AosGenerateForm',
- mapPropsToValues: () => ({
- preset: 'Normal',
- settings: {
- area: 'Vanilla',
- boss: 'Vanilla',
- doublechaos: 'false',
- enemy: 'Vanilla',
- grahm: 'BookSouls',
- itempool: 'Standard',
- kicker: 'false',
- levelexp: 'Vanilla',
- logic: 'AreaTechTiers',
- mapassist: 'false',
- nodupes: 'false',
- noww: 'false',
- palette: 'Vanilla',
- panther: 'Rand70Dup',
- reqallsouls: 'false',
- shopprice: 'Vanilla',
- shopSouls: 'Vanilla',
- startshop: 'Vanilla',
- telestart: 'false',
- weight: '2.5',
- },
- }),
-})(withTranslation()(Generate));
+++ /dev/null
-import PropTypes from 'prop-types';
-import React from 'react';
-
-import Cell from './Cell';
-import Region from './Region';
-import Room from './Room';
-
-const Arena = ({ x, y }) =>
- <Region name="arena" x={x} y={y}>
- <Room x={2} y={0}>
- <Cell x={0} y={0} left="solid" top="solid" />
- <Cell x={1} y={0} right="door" top="solid" />
- <Cell x={0} y={1} left="solid" />
- <Cell x={1} y={1} right="door" />
- <Cell x={0} y={2} bottom="door" left="solid" />
- <Cell x={1} y={2} bottom="solid" right="door" />
- </Room>
- <Room x={4} y={0}>
- <Cell x={0} y={0} bottom="solid" left="door" top="solid" />
- <Cell x={1} y={0} bottom="solid" top="solid" />
- <Cell x={2} y={0} bottom="solid" top="solid" />
- <Cell x={3} y={0} bottom="solid" right="solid" top="solid" />
- </Room>
- <Room x={4} y={1}>
- <Cell x={0} y={0} bottom="solid" left="door" top="solid" />
- <Cell x={1} y={0} bottom="solid" top="solid" />
- <Cell x={2} y={0} bottom="solid" top="solid" />
- <Cell x={3} y={0} bottom="solid" right="door" top="solid" />
- </Room>
- <Room x={4} y={2}>
- <Cell bottom="solid" left="door" right="solid" top="solid" />
- </Room>
- <Room x={8} y={0}>
- <Cell x={0} y={0} left="solid" right="door" top="solid" />
- <Cell x={0} y={1} left="door" right="solid" />
- <Cell x={0} y={2} bottom="door" left="solid" right="solid" />
- </Room>
- <Room x={9} y={0}>
- <Cell bottom="solid" left="door" right="solid" top="solid" />
- </Room>
- <Room x={2} y={3}>
- <Cell x={0} y={0} bottom="door" left="solid" top="door" />
- <Cell x={1} y={0} bottom="solid" top="solid" />
- <Cell x={2} y={0} bottom="solid" right="door" top="solid" />
- </Room>
- <Room x={5} y={3}>
- <Cell x={0} y={0} bottom="solid" left="door" top="solid" />
- <Cell x={1} y={0} bottom="solid" right="door" top="solid" />
- </Room>
- <Room x={7} y={3}>
- <Cell x={0} y={0} bottom="solid" left="door" top="solid" />
- <Cell x={1} y={0} bottom="solid" top="door" />
- <Cell x={2} y={0} bottom="door" right="door" top="solid" />
- </Room>
- <Room type="teleporter" x={10} y={3}>
- <Cell x={0} y={0} bottom="solid" left="door" right="solid" top="solid" />
- </Room>
- <Room type="save" x={1} y={4}>
- <Cell x={0} y={0} bottom="solid" left="solid" right="door" top="solid" />
- </Room>
- <Room x={2} y={4}>
- <Cell bottom="solid" left="door" right="door" top="door" />
- </Room>
- <Room x={3} y={4}>
- <Cell x={0} y={0} left="door" right="door" top="solid" />
- <Cell x={0} y={1} left="solid" right="door" />
- <Cell x={0} y={2} bottom="solid" left="door" right="door" />
- </Room>
- <Room x={4} y={4}>
- <Cell x={0} y={0} bottom="solid" left="door" top="solid" />
- <Cell x={1} y={0} bottom="solid" top="solid" />
- <Cell x={2} y={0} bottom="solid" top="solid" />
- <Cell x={3} y={0} bottom="solid" right="door" top="solid" />
- </Room>
- <Room x={8} y={4}>
- <Cell bottom="solid" left="door" right="solid" top="solid" />
- </Room>
- <Room x={9} y={4}>
- <Cell x={0} y={0} left="solid" top="door" />
- <Cell x={1} y={0} right="solid" top="solid" />
- <Cell x={0} y={1} left="solid" />
- <Cell x={1} y={1} right="solid" />
- <Cell x={0} y={2} bottom="solid" left="solid" />
- <Cell x={1} y={2} bottom="solid" right="door" />
- </Room>
- <Room x={4} y={5}>
- <Cell x={0} y={0} bottom="solid" left="door" top="solid" />
- <Cell x={1} y={0} bottom="solid" top="solid" />
- <Cell x={2} y={0} bottom="solid" top="solid" />
- <Cell x={3} y={0} bottom="solid" right="door" top="solid" />
- </Room>
- <Room x={8} y={5}>
- <Cell bottom="solid" left="door" right="solid" top="solid" />
- </Room>
- <Room x={0} y={6}>
- <Cell bottom="solid" left="solid" right="door" top="solid" />
- </Room>
- <Room x={1} y={6}>
- <Cell x={0} y={0} bottom="solid" left="door" top="solid" />
- <Cell x={1} y={0} bottom="solid" right="door" top="solid" />
- </Room>
- <Room x={4} y={6}>
- <Cell x={0} y={0} bottom="solid" left="door" top="solid" />
- <Cell x={1} y={0} bottom="solid" top="solid" />
- <Cell x={2} y={0} bottom="solid" top="solid" />
- <Cell x={3} y={0} bottom="solid" right="door" top="solid" />
- </Room>
- <Room x={8} y={6}>
- <Cell bottom="solid" left="door" right="solid" top="solid" />
- </Room>
- <Room x={11} y={6}>
- <Cell bottom="solid" left="door" right="door" top="solid" />
- </Room>
- <Room type="transition right" x={12} y={6}>
- <Cell bottom="solid" left="door" right="door" top="solid" />
- </Room>
- </Region>;
-
-Arena.propTypes = {
- x: PropTypes.number,
- y: PropTypes.number,
-};
-
-export default Arena;
+++ /dev/null
-import PropTypes from 'prop-types';
-import React from 'react';
-
-import Cell from './Cell';
-import Region from './Region';
-import Room from './Room';
-
-const CastleCorridor = ({ x, y }) =>
- <Region name="castle-corridor" x={x} y={y}>
- <Room x={0} y={6}>
- <Cell x={0} y={0} left="solid" top="solid" />
- <Cell x={1} y={0} right="solid" top="solid" />
- <Cell x={0} y={1} left="solid" />
- <Cell x={1} y={1} right="solid" />
- <Cell x={0} y={2} bottom="solid" left="solid" />
- <Cell x={1} y={2} bottom="solid" right="door" />
- </Room>
- <Room type="teleporter" x={2} y={7}>
- <Cell bottom="solid" left="solid" right="door" top="solid" />
- </Room>
- <Room x={3} y={4}>
- <Cell x={0} y={0} left="solid" top="solid" />
- <Cell x={1} y={0} right="solid" top="solid" />
- <Cell x={0} y={1} left="solid" />
- <Cell x={1} y={1} right="solid" />
- <Cell x={0} y={2} left="solid" />
- <Cell x={1} y={2} right="solid" />
- <Cell x={0} y={3} bottom="door" left="door" />
- <Cell x={1} y={3} bottom="solid" right="solid" />
- </Room>
- <Room x={2} y={8}>
- <Cell x={0} y={0} bottom="solid" left="door" top="solid" />
- <Cell x={1} y={0} bottom="solid" top="door" />
- <Cell x={2} y={0} bottom="solid" top="solid" />
- <Cell x={3} y={0} bottom="door" top="solid" />
- <Cell x={4} y={0} bottom="solid" right="door" top="solid" />
- </Room>
- <Room x={7} y={8}>
- <Cell x={0} y={0} left="door" top="solid" />
- <Cell x={1} y={0} right="door" top="solid" />
- <Cell x={0} y={1} bottom="solid" left="door" />
- <Cell x={1} y={1} bottom="solid" right="door" />
- </Room>
- <Room type="transition left" x={6} y={9}>
- <Cell bottom="solid" left="door" right="door" top="solid" />
- </Room>
- <Room type="save" x={9} y={9}>
- <Cell bottom="solid" left="door" right="solid" top="solid" />
- </Room>
- <Room x={9} y={8}>
- <Cell x={0} y={0} bottom="solid" left="door" top="solid" />
- <Cell x={1} y={0} bottom="solid" top="solid" />
- <Cell x={2} y={0} bottom="solid" right="door" top="solid" />
- </Room>
- <Room x={12} y={3}>
- <Cell x={0} y={0} left="solid" top="solid" />
- <Cell x={1} y={0} right="solid" top="door" />
- <Cell x={0} y={1} left="solid" />
- <Cell x={1} y={1} right="solid" />
- <Cell x={0} y={2} left="solid" />
- <Cell x={1} y={2} right="solid" />
- <Cell x={0} y={3} left="solid" />
- <Cell x={1} y={3} right="solid" />
- <Cell x={0} y={4} left="solid" />
- <Cell x={1} y={4} right="solid" />
- <Cell x={0} y={5} bottom="solid" left="door" />
- <Cell x={1} y={5} bottom="solid" right="door" />
- </Room>
- <Room type="transition left" x={12} y={2}>
- <Cell bottom="solid" left="door" right="door" top="solid" />
- </Room>
- <Room x={13} y={2}>
- <Cell bottom="door" left="door" right="solid" top="solid" />
- </Room>
- <Room x={14} y={8}>
- <Cell x={0} y={0} bottom="solid" left="door" top="solid" />
- <Cell x={1} y={0} bottom="solid" right="door" top="solid" />
- </Room>
- <Room type="secret" x={15} y={9}>
- <Cell bottom="solid" left="solid" right="door" top="solid" />
- </Room>
- <Room x={16} y={8}>
- <Cell x={0} y={0} left="door" right="door" top="door" />
- <Cell x={0} y={1} bottom="solid" left="door" right="door" />
- </Room>
- <Room type="save" x={17} y={8}>
- <Cell bottom="solid" left="door" right="solid" top="solid" />
- </Room>
- <Room x={17} y={9}>
- <Cell x={0} y={0} bottom="solid" left="door" top="solid" />
- <Cell x={1} y={0} bottom="solid" top="solid" />
- <Cell x={2} y={0} bottom="solid" top="solid" />
- <Cell x={3} y={0} bottom="solid" top="door" />
- <Cell x={4} y={0} bottom="solid" right="door" top="solid" />
- </Room>
- <Room type="transition right" x={22} y={9}>
- <Cell bottom="solid" left="door" right="door" top="solid" />
- </Room>
- <Room x={20} y={7}>
- <Cell x={0} y={0} left="solid" right="door" top="solid" />
- <Cell x={0} y={1} bottom="door" left="solid" right="solid" />
- </Room>
- <Room x={21} y={7}>
- <Cell bottom="solid" left="door" right="door" top="solid" />
- </Room>
- <Room type="transition right" x={22} y={7}>
- <Cell bottom="solid" left="door" right="door" top="solid" />
- </Room>
- <Room x={16} y={3}>
- <Cell x={0} y={0} left="solid" right="door" top="solid" />
- <Cell x={0} y={1} left="solid" right="solid" />
- <Cell x={0} y={2} left="solid" right="solid" />
- <Cell x={0} y={3} left="solid" right="solid" />
- <Cell x={0} y={4} bottom="door" left="solid" right="solid" />
- </Room>
- <Room x={17} y={3}>
- <Cell bottom="solid" left="door" right="door" top="solid" />
- </Room>
- <Room x={18} y={2}>
- <Cell x={0} y={0} left="solid" top="door" />
- <Cell x={1} y={0} top="solid" />
- <Cell x={2} y={0} right="door" top="solid" />
- <Cell x={0} y={1} bottom="solid" left="door" />
- <Cell x={1} y={1} bottom="solid" />
- <Cell x={2} y={1} bottom="solid" right="door" />
- </Room>
- <Room x={18} y={1}>
- <Cell bottom="door" left="solid" right="door" top="solid" />
- </Room>
- <Room type="transition right" x={19} y={1}>
- <Cell bottom="solid" left="door" right="door" top="solid" />
- </Room>
- <Room x={21} y={2}>
- <Cell x={0} y={0} bottom="solid" left="door" top="solid" />
- <Cell x={1} y={0} bottom="solid" top="solid" />
- <Cell x={2} y={0} bottom="solid" right="door" top="solid" />
- </Room>
- <Room x={21} y={3}>
- <Cell x={0} y={0} bottom="solid" left="door" top="solid" />
- <Cell x={1} y={0} bottom="solid" top="solid" />
- <Cell x={2} y={0} bottom="solid" top="solid" />
- <Cell x={3} y={0} bottom="solid" top="solid" />
- <Cell x={4} y={0} bottom="solid" top="solid" />
- <Cell x={5} y={0} bottom="solid" top="solid" />
- <Cell x={6} y={0} bottom="solid" right="door" top="solid" />
- </Room>
- <Room x={24} y={1}>
- <Cell x={0} y={0} left="solid" top="solid" />
- <Cell x={1} y={0} top="solid" />
- <Cell x={2} y={0} right="door" top="solid" />
- <Cell x={0} y={1} bottom="solid" left="door" />
- <Cell x={1} y={1} bottom="solid" />
- <Cell x={2} y={1} bottom="solid" right="door" />
- </Room>
- <Room x={27} y={1}>
- <Cell bottom="solid" left="door" right="solid" top="solid" />
- </Room>
- <Room x={27} y={2}>
- <Cell bottom="solid" left="door" right="solid" top="solid" />
- </Room>
- <Room x={28} y={1}>
- <Cell x={0} y={0} left="solid" top="solid" />
- <Cell x={1} y={0} right="solid" top="door" />
- <Cell x={0} y={1} left="solid" />
- <Cell x={1} y={1} right="solid" />
- <Cell x={0} y={2} bottom="solid" left="door" />
- <Cell x={1} y={2} bottom="solid" right="door" />
- </Room>
- <Room type="transition left" x={28} y={0}>
- <Cell bottom="solid" left="door" right="door" top="solid" />
- </Room>
- <Room x={29} y={0}>
- <Cell bottom="door" left="door" right="solid" top="solid" />
- </Room>
- <Room x={30} y={3}>
- <Cell x={0} y={0} bottom="solid" left="door" top="solid" />
- <Cell x={1} y={0} bottom="solid" top="solid" />
- <Cell x={2} y={0} bottom="solid" top="solid" />
- <Cell x={3} y={0} bottom="solid" top="solid" />
- <Cell x={4} y={0} bottom="solid" right="door" top="solid" />
- </Room>
- <Room x={35} y={2}>
- <Cell x={0} y={0} left="solid" right="door" top="solid" />
- <Cell x={0} y={1} bottom="solid" left="door" right="door" />
- </Room>
- <Room type="transition right" x={36} y={2}>
- <Cell bottom="solid" left="door" right="door" top="solid" />
- </Room>
- <Room x={36} y={3}>
- <Cell x={0} y={0} bottom="solid" left="door" top="solid" />
- <Cell x={1} y={0} bottom="solid" top="solid" />
- <Cell x={2} y={0} bottom="solid" right="door" top="solid" />
- </Room>
- <Room x={39} y={3}>
- <Cell x={0} y={0} left="door" right="door" top="solid" />
- <Cell x={0} y={1} bottom="solid" left="door" right="door" />
- </Room>
- <Room type="save" x={40} y={3}>
- <Cell bottom="solid" left="door" right="solid" top="solid" />
- </Room>
- <Room x={40} y={4}>
- <Cell x={0} y={0} bottom="solid" left="door" top="solid" />
- <Cell x={1} y={0} bottom="solid" right="door" top="solid" />
- </Room>
- <Room type="transition right" x={42} y={4}>
- <Cell bottom="solid" left="door" right="door" top="solid" />
- </Room>
- <Room x={37} y={4}>
- <Cell x={0} y={0} left="solid" top="solid" />
- <Cell x={1} y={0} right="door" top="solid" />
- <Cell x={0} y={1} bottom="solid" left="door" />
- <Cell x={1} y={1} bottom="solid" right="door" />
- </Room>
- <Room x={39} y={5}>
- <Cell bottom="solid" left="door" right="solid" top="solid" />
- </Room>
- <Room x={34} y={5}>
- <Cell x={0} y={0} bottom="solid" left="door" top="solid" />
- <Cell x={1} y={0} bottom="solid" top="solid" />
- <Cell x={2} y={0} bottom="solid" right="door" top="solid" />
- </Room>
- <Room x={33} y={5}>
- <Cell bottom="solid" left="solid" right="door" top="solid" />
- </Room>
- </Region>;
-
-CastleCorridor.propTypes = {
- x: PropTypes.number,
- y: PropTypes.number,
-};
-
-export default CastleCorridor;
+++ /dev/null
-import PropTypes from 'prop-types';
-import React from 'react';
-
-const hasCorner = (a, b) =>
- (hasWall(a) && hasWall(b)) || a === 'door' || b == 'door';
-
-const hasWall = side => side && side !== 'open';
-
-const wallType = side => side || 'open';
-
-const Cell = ({ bottom, left, right, top, x, y }) =>
- <g className="cell" transform={`translate(${x || 0}, ${y || 0})`}>
- <rect className="background" x="-0.03125" y="-0.03125" width="1.03125" height="1.03125" />
- {hasWall(top) ?
- <line className={`wall ${wallType(top)}`} x1="-0.03125" y1="0" x2="1.03125" y2="0" />
- : null}
- {hasWall(right) ?
- <line className={`wall ${wallType(right)}`} x1="1" y1="-0.03125" x2="1" y2="1.03125" />
- : null}
- {hasWall(bottom) ?
- <line className={`wall ${wallType(bottom)}`} x1="-0.03125" y1="1" x2="1.03125" y2="1" />
- : null}
- {hasWall(left) ?
- <line className={`wall ${wallType(left)}`} x1="0" y1="-0.03125" x2="0" y2="1.03125" />
- : null}
- {hasCorner(top, left) ?
- <rect className="corner" x="-0.0625" y="-0.0625" width="0.125" height="0.125" />
- : null}
- {hasCorner(top, right) ?
- <rect className="corner" x="0.9375" y="-0.0625" width="0.125" height="0.125" />
- : null}
- {hasCorner(bottom, left) ?
- <rect className="corner" x="-0.0625" y="0.9375" width="0.125" height="0.125" />
- : null}
- {hasCorner(bottom, right) ?
- <rect className="corner" x="0.9375" y="0.9375" width="0.125" height="0.125" />
- : null}
- </g>;
-
-Cell.propTypes = {
- bottom: PropTypes.string,
- left: PropTypes.string,
- right: PropTypes.string,
- top: PropTypes.string,
- x: PropTypes.number,
- y: PropTypes.number,
-};
-
-export default Cell;
+++ /dev/null
-import PropTypes from 'prop-types';
-import React from 'react';
-
-import Cell from './Cell';
-import Region from './Region';
-import Room from './Room';
-
-const Chapel = ({ x, y }) =>
- <Region name="chapel" x={x} y={y}>
- <Room x={3} y={0}>
- <Cell x={0} y={0} left="solid" top="solid" />
- <Cell x={1} y={0} top="solid" />
- <Cell x={2} y={0} top="solid" />
- <Cell x={3} y={0} right="solid" top="solid" />
- <Cell x={0} y={1} left="solid" />
- <Cell x={1} y={1} />
- <Cell x={2} y={1} />
- <Cell x={3} y={1} right="solid" />
- <Cell x={0} y={2} left="solid" />
- <Cell x={1} y={2} />
- <Cell x={2} y={2} />
- <Cell x={3} y={2} right="solid" />
- <Cell x={0} y={3} bottom="solid" left="solid" />
- <Cell x={1} y={3} bottom="door" />
- <Cell x={2} y={3} bottom="door" />
- <Cell x={3} y={3} bottom="solid" right="solid" />
- </Room>
- <Room x={3} y={4}>
- <Cell x={0} y={0} bottom="solid" left="door" top="solid" />
- <Cell x={1} y={0} bottom="solid" top="door" />
- <Cell x={2} y={0} bottom="solid" top="door" />
- <Cell x={3} y={0} bottom="solid" right="door" top="solid" />
- </Room>
- <Room type="transition left" x={2} y={4}>
- <Cell bottom="solid" left="door" right="door" top="solid" />
- </Room>
- <Room x={7} y={2}>
- <Cell x={0} y={0} left="solid" top="solid" />
- <Cell x={1} y={0} top="solid" />
- <Cell x={2} y={0} right="solid" top="solid" />
- <Cell x={0} y={1} bottom="solid" left="solid" />
- <Cell x={1} y={1} bottom="door" />
- <Cell x={2} y={1} bottom="solid" right="solid" />
- </Room>
- <Room x={7} y={4}>
- <Cell x={0} y={0} left="door" top="solid" />
- <Cell x={1} y={0} top="door" />
- <Cell x={2} y={0} right="solid" top="solid" />
- <Cell x={0} y={1} bottom="solid" left="solid" />
- <Cell x={1} y={1} />
- <Cell x={2} y={1} right="solid" />
- <Cell x={1} y={2} bottom="solid" left="solid" />
- <Cell x={2} y={2} bottom="door" right="solid" />
- </Room>
- <Room type="secret" x={7} y={6}>
- <Cell bottom="door" left="solid" right="solid" top="solid" />
- </Room>
- <Room type="teleporter" x={2} y={5}>
- <Cell bottom="solid" left="solid" right="door" top="solid" />
- </Room>
- <Room x={2} y={6}>
- <Cell bottom="solid" left="solid" right="door" top="solid" />
- </Room>
- <Room x={3} y={5}>
- <Cell x={0} y={0} left="door" top="solid" />
- <Cell x={1} y={0} right="solid" top="solid" />
- <Cell x={0} y={1} left="door" />
- <Cell x={1} y={1} right="solid" />
- <Cell x={0} y={2} bottom="solid" left="door" />
- <Cell x={1} y={2} bottom="solid" right="door" />
- </Room>
- <Room x={5} y={5}>
- <Cell x={0} y={0} left="solid" top="solid" />
- <Cell x={1} y={0} right="solid" top="solid" />
- <Cell x={0} y={1} left="solid" />
- <Cell x={1} y={1} right="solid" />
- <Cell x={0} y={2} left="door" />
- <Cell x={1} y={2} right="door" />
- <Cell x={0} y={3} bottom="solid" left="door" />
- <Cell x={1} y={3} bottom="solid" right="door" />
- </Room>
- <Room x={7} y={7}>
- <Cell bottom="solid" left="door" right="solid" top="door" />
- </Room>
- <Room x={7} y={8}>
- <Cell x={0} y={0} bottom="solid" left="door" top="solid" />
- <Cell x={1} y={0} bottom="solid" right="door" top="solid" />
- </Room>
- <Room x={9} y={7}>
- <Cell x={0} y={0} left="door" right="solid" top="door" />
- <Cell x={0} y={1} bottom="solid" left="door" right="solid" />
- </Room>
- <Room type="save" x={8} y={7}>
- <Cell bottom="solid" left="solid" right="door" top="solid" />
- </Room>
- <Room x={2} y={8}>
- <Cell x={0} y={0} bottom="solid" left="door" top="solid" />
- <Cell x={1} y={0} bottom="solid" top="solid" />
- <Cell x={2} y={0} bottom="solid" right="door" top="solid" />
- </Room>
- <Room x={1} y={7}>
- <Cell x={0} y={0} bottom="solid" left="door" top="solid" />
- <Cell x={1} y={0} bottom="solid" right="door" top="solid" />
- </Room>
- <Room x={0} y={7}>
- <Cell x={0} y={0} left="solid" right="door" top="solid" />
- <Cell x={0} y={1} bottom="solid" left="solid" right="door" />
- </Room>
- <Room x={1} y={8}>
- <Cell x={0} y={0} left="door" right="door" top="solid" />
- <Cell x={0} y={1} bottom="solid" left="solid" right="door" />
- </Room>
- <Room type="transition right" x={2} y={9}>
- <Cell bottom="solid" left="door" right="door" top="solid" />
- </Room>
- </Region>;
-
-Chapel.propTypes = {
- x: PropTypes.number,
- y: PropTypes.number,
-};
-
-export default Chapel;
+++ /dev/null
-import PropTypes from 'prop-types';
-import React from 'react';
-
-import Cell from './Cell';
-import Region from './Region';
-import Room from './Room';
-
-const ClockTower = ({ x, y }) =>
- <Region name="clock-tower" x={x} y={y}>
- <Room x={2} y={0}>
- <Cell bottom="solid" left="solid" right="door" top="solid" />
- </Room>
- <Room x={3} y={0}>
- <Cell x={0} y={0} bottom="solid" left="door" top="solid" />
- <Cell x={1} y={0} bottom="solid" right="door" top="solid" />
- </Room>
- <Room x={5} y={0}>
- <Cell x={0} y={0} left="door" right="door" top="solid" />
- <Cell x={0} y={1} bottom="solid" left="door" right="solid" />
- </Room>
- <Room type="save" x={6} y={0}>
- <Cell bottom="solid" left="door" right="solid" top="solid" />
- </Room>
- <Room x={3} y={1}>
- <Cell x={0} y={0} bottom="door" left="solid" top="solid" />
- <Cell x={1} y={0} bottom="solid" right="door" top="solid" />
- </Room>
- <Room type="transition left" x={0} y={2}>
- <Cell bottom="solid" left="door" right="door" top="solid" />
- </Room>
- <Room x={1} y={2}>
- <Cell x={0} y={0} bottom="solid" left="door" top="solid" />
- <Cell x={1} y={0} bottom="solid" right="door" top="solid" />
- </Room>
- <Room x={3} y={2}>
- <Cell bottom="solid" left="door" right="door" top="door" />
- </Room>
- <Room x={4} y={2}>
- <Cell x={0} y={0} left="door" right="solid" top="solid" />
- <Cell x={0} y={1} bottom="solid" left="door" right="solid" />
- </Room>
- <Room x={5} y={2}>
- <Cell x={0} y={0} left="solid" right="door" top="solid" />
- <Cell x={0} y={1} bottom="door" left="solid" right="solid" />
- </Room>
- <Room x={6} y={2}>
- <Cell x={0} y={0} bottom="solid" left="door" top="solid" />
- <Cell x={1} y={0} bottom="solid" right="door" top="solid" />
- </Room>
- <Room type="transition right" x={8} y={2}>
- <Cell bottom="solid" left="door" right="door" top="solid" />
- </Room>
- <Room x={3} y={3}>
- <Cell x={0} y={0} left="solid" right="door" top="solid" />
- <Cell x={0} y={1} bottom="solid" left="solid" right="door" />
- </Room>
- <Room x={4} y={4}>
- <Cell x={0} y={0} left="door" right="solid" top="solid" />
- <Cell x={0} y={1} bottom="solid" left="door" right="solid" />
- </Room>
- <Room x={5} y={4}>
- <Cell x={0} y={0} left="solid" right="solid" top="door" />
- <Cell x={0} y={1} bottom="solid" left="solid" right="door" />
- </Room>
- <Room x={2} y={5}>
- <Cell x={0} y={0} left="solid" right="door" top="solid" />
- <Cell x={0} y={1} bottom="solid" left="door" right="door" />
- </Room>
- <Room x={3} y={5}>
- <Cell bottom="solid" left="door" right="door" top="solid" />
- </Room>
- <Room x={6} y={5}>
- <Cell x={0} y={0} left="door" right="solid" top="solid" />
- <Cell x={0} y={1} bottom="solid" left="door" right="door" />
- </Room>
- <Room type="secret" x={1} y={6}>
- <Cell bottom="solid" left="solid" right="door" top="solid" />
- </Room>
- <Room x={3} y={6}>
- <Cell bottom="solid" left="door" right="door" top="solid" />
- </Room>
- <Room x={4} y={6}>
- <Cell bottom="door" left="door" right="door" top="solid" />
- </Room>
- <Room x={5} y={6}>
- <Cell bottom="solid" left="door" right="door" top="solid" />
- </Room>
- <Room type="save" x={7} y={6}>
- <Cell bottom="solid" left="door" right="solid" top="solid" />
- </Room>
- <Room x={1} y={7}>
- <Cell bottom="solid" left="solid" right="door" top="solid" />
- </Room>
- <Room x={2} y={7}>
- <Cell x={0} y={0} left="door" right="door" top="solid" />
- <Cell x={0} y={1} bottom="solid" left="door" right="door" />
- </Room>
- <Room x={3} y={7}>
- <Cell x={0} y={0} bottom="solid" left="door" top="solid" />
- <Cell x={1} y={0} bottom="solid" top="door" />
- <Cell x={2} y={0} bottom="solid" right="door" top="solid" />
- </Room>
- <Room x={6} y={7}>
- <Cell x={0} y={0} left="door" right="door" top="solid" />
- <Cell x={0} y={1} bottom="solid" left="solid" right="door" />
- </Room>
- <Room x={1} y={7}>
- <Cell bottom="solid" left="door" right="solid" top="solid" />
- </Room>
- <Room x={1} y={8}>
- <Cell x={0} y={0} left="solid" right="door" top="solid" />
- <Cell x={0} y={1} bottom="solid" left="solid" right="door" />
- </Room>
- <Room x={3} y={8}>
- <Cell x={0} y={0} bottom="solid" left="door" top="solid" />
- <Cell x={1} y={0} bottom="solid" top="solid" />
- <Cell x={2} y={0} bottom="solid" right="solid" top="solid" />
- </Room>
- <Room x={7} y={8}>
- <Cell x={0} y={0} left="door" right="solid" top="solid" />
- <Cell x={0} y={1} bottom="solid" left="door" right="solid" />
- </Room>
- <Room x={2} y={9}>
- <Cell x={0} y={0} left="door" right="solid" top="solid" />
- <Cell x={0} y={1} bottom="solid" left="door" right="solid" />
- </Room>
- <Room x={6} y={9}>
- <Cell x={0} y={0} left="solid" right="door" top="solid" />
- <Cell x={0} y={1} bottom="solid" left="door" right="door" />
- </Room>
- <Room x={1} y={10}>
- <Cell bottom="solid" left="solid" right="door" top="solid" />
- </Room>
- <Room type="transition left" x={4} y={10}>
- <Cell bottom="solid" left="door" right="door" top="solid" />
- </Room>
- <Room x={5} y={10}>
- <Cell bottom="solid" left="door" right="door" top="solid" />
- </Room>
- <Room type="teleporter" x={7} y={10}>
- <Cell bottom="solid" left="door" right="solid" top="solid" />
- </Room>
- </Region>;
-
-ClockTower.propTypes = {
- x: PropTypes.number,
- y: PropTypes.number,
-};
-
-export default ClockTower;
+++ /dev/null
-import PropTypes from 'prop-types';
-import React from 'react';
-
-import Cell from './Cell';
-import Region from './Region';
-import Room from './Room';
-
-const DanceHall = ({ x, y }) =>
- <Region name="dance-hall" x={x} y={y}>
- <Room x={3} y={0}>
- <Cell x={0} y={0} left="solid" top="solid" />
- <Cell x={1} y={0} right="solid" top="solid" />
- <Cell x={0} y={1} bottom="solid" left="door" />
- <Cell x={1} y={1} bottom="door" right="door" />
- </Room>
- <Room x={2} y={1}>
- <Cell bottom="solid" left="solid" right="door" top="solid" />
- </Room>
- <Room x={5} y={1}>
- <Cell bottom="solid" left="door" right="solid" top="solid" />
- </Room>
- <Room x={2} y={2}>
- <Cell x={0} y={0} bottom="door" left="solid" top="solid" />
- <Cell x={1} y={0} bottom="solid" top="solid" />
- <Cell x={2} y={0} bottom="solid" top="door" />
- <Cell x={3} y={0} bottom="solid" right="solid" top="solid" />
- </Room>
- <Room type="secret" x={1} y={3}>
- <Cell bottom="solid" left="solid" right="door" top="solid" />
- </Room>
- <Room x={2} y={3}>
- <Cell bottom="solid" left="door" right="door" top="door" />
- </Room>
- <Room x={3} y={3}>
- <Cell x={0} y={0} bottom="solid" left="door" top="solid" />
- <Cell x={1} y={0} bottom="solid" right="door" top="solid" />
- </Room>
- <Room x={5} y={3}>
- <Cell bottom="door" left="door" right="door" top="solid" />
- </Room>
- <Room type="save" x={6} y={3}>
- <Cell bottom="solid" left="door" right="solid" top="solid" />
- </Room>
- <Room type="secret" x={9} y={3}>
- <Cell x={0} y={0} bottom="solid" left="solid" top="solid" />
- <Cell x={1} y={0} bottom="door" right="solid" top="solid" />
- </Room>
- <Room x={0} y={4}>
- <Cell x={0} y={0} left="solid" right="door" top="solid" />
- <Cell x={0} y={1} bottom="door" left="solid" right="door" />
- </Room>
- <Room x={1} y={4}>
- <Cell bottom="solid" left="door" right="door" top="solid" />
- </Room>
- <Room type="teleporter" x={1} y={5}>
- <Cell bottom="solid" left="door" right="solid" top="solid" />
- </Room>
- <Room x={2} y={4}>
- <Cell x={0} y={0} left="door" right="door" top="solid" />
- <Cell x={0} y={1} bottom="solid" left="solid" right="door" />
- </Room>
- <Room x={3} y={4}>
- <Cell x={0} y={0} left="door" top="solid" />
- <Cell x={1} y={0} right="door" top="solid" />
- <Cell x={0} y={1} bottom="door" left="door" />
- <Cell x={1} y={1} bottom="solid" right="door" />
- </Room>
- <Room x={5} y={4}>
- <Cell x={0} y={0} left="door" right="door" top="door" />
- <Cell x={0} y={1} bottom="solid" left="door" right="door" />
- </Room>
- <Room x={6} y={4}>
- <Cell x={0} y={0} bottom="solid" left="door" top="solid" />
- <Cell x={1} y={0} bottom="solid" top="solid" />
- <Cell x={2} y={0} bottom="solid" top="solid" />
- <Cell x={3} y={0} bottom="solid" top="solid" />
- <Cell x={4} y={0} bottom="solid" right="door" top="door" />
- </Room>
- <Room type="transition right" x={11} y={4}>
- <Cell bottom="solid" left="door" right="door" top="solid" />
- </Room>
- <Room x={6} y={5}>
- <Cell x={0} y={0} bottom="solid" left="door" top="solid" />
- <Cell x={1} y={0} bottom="solid" top="solid" />
- <Cell x={2} y={0} bottom="solid" right="door" top="solid" />
- </Room>
- <Room type="transition right" x={9} y={5}>
- <Cell bottom="solid" left="door" right="door" top="solid" />
- </Room>
- <Room x={3} y={6}>
- <Cell x={0} y={0} left="solid" right="door" top="door" />
- <Cell x={0} y={1} bottom="door" left="solid" right="solid" />
- </Room>
- <Room x={4} y={6}>
- <Cell x={0} y={0} bottom="solid" left="door" top="solid" />
- <Cell x={1} y={0} bottom="solid" right="door" top="solid" />
- </Room>
- <Room x={6} y={6}>
- <Cell x={0} y={0} bottom="solid" left="door" top="solid" />
- <Cell x={1} y={0} bottom="solid" right="door" top="solid" />
- </Room>
- <Room x={4} y={7}>
- <Cell x={0} y={0} bottom="solid" left="solid" top="solid" />
- <Cell x={1} y={0} bottom="solid" top="solid" />
- <Cell x={2} y={0} bottom="solid" top="solid" />
- <Cell x={3} y={0} bottom="solid" right="door" top="solid" />
- </Room>
- <Room x={8} y={6}>
- <Cell x={0} y={0} left="door" right="solid" top="solid" />
- <Cell x={0} y={1} bottom="solid" left="door" right="solid" />
- </Room>
- <Room x={3} y={8}>
- <Cell bottom="solid" left="solid" right="door" top="door" />
- </Room>
- <Room x={3} y={9}>
- <Cell bottom="solid" left="solid" right="door" top="solid" />
- </Room>
- <Room x={4} y={8}>
- <Cell x={0} y={0} bottom="solid" left="door" top="solid" />
- <Cell x={1} y={0} bottom="solid" right="door" top="solid" />
- </Room>
- <Room x={4} y={9}>
- <Cell x={0} y={0} bottom="solid" left="door" top="solid" />
- <Cell x={1} y={0} bottom="solid" right="door" top="solid" />
- </Room>
- <Room x={6} y={8}>
- <Cell x={0} y={0} left="door" right="solid" top="solid" />
- <Cell x={0} y={1} bottom="solid" left="door" right="door" />
- </Room>
- <Room type="save" x={7} y={9}>
- <Cell bottom="solid" left="door" right="solid" top="solid" />
- </Room>
- </Region>;
-
-DanceHall.propTypes = {
- x: PropTypes.number,
- y: PropTypes.number,
-};
-
-export default DanceHall;
+++ /dev/null
-import PropTypes from 'prop-types';
-import React from 'react';
-
-import Cell from './Cell';
-import Region from './Region';
-import Room from './Room';
-
-const FloatingGarden = ({ x, y }) =>
- <Region name="floating-garden" x={x} y={y}>
- <Room x={20} y={22}>
- <Cell x={0} y={0} left="door" top="solid" />
- <Cell x={1} y={0} top="solid" />
- <Cell x={2} y={0} right="door" top="solid" />
- <Cell x={0} y={1} bottom="door" left="solid" />
- <Cell x={1} y={1} bottom="door" />
- <Cell x={2} y={1} bottom="solid" right="solid" />
- </Room>
- <Room x={23} y={22}>
- <Cell x={0} y={0} left="door" top="solid" />
- <Cell x={1} y={0} top="solid" />
- <Cell x={2} y={0} right="door" top="solid" />
- <Cell x={0} y={1} bottom="door" left="door" />
- <Cell x={1} y={1} bottom="door" />
- <Cell x={2} y={1} bottom="solid" right="solid" />
- </Room>
- <Room x={20} y={24}>
- <Cell x={0} y={0} left="solid" top="door" />
- <Cell x={1} y={0} top="door" />
- <Cell x={2} y={0} right="door" top="solid" />
- <Cell x={0} y={1} bottom="solid" left="door" />
- <Cell x={1} y={1} bottom="solid" />
- <Cell x={2} y={1} bottom="solid" right="door" />
- </Room>
- <Room x={23} y={24}>
- <Cell x={0} y={0} left="door" top="door" />
- <Cell x={1} y={0} top="door" />
- <Cell x={2} y={0} right="solid" top="solid" />
- <Cell x={0} y={1} bottom="solid" left="door" />
- <Cell x={1} y={1} bottom="solid" />
- <Cell x={2} y={1} bottom="solid" right="door" />
- </Room>
- <Room type="transition left" x={19} y={25}>
- <Cell bottom="solid" left="door" right="door" top="solid" />
- </Room>
- <Room type="save" x={26} y={25}>
- <Cell bottom="solid" left="door" right="solid" top="solid" />
- </Room>
- <Room x={0} y={4}>
- <Cell x={0} y={0} left="solid" top="solid" />
- <Cell x={1} y={0} top="solid" />
- <Cell x={2} y={0} top="solid" />
- <Cell x={3} y={0} right="solid" top="solid" />
- <Cell x={0} y={1} left="solid" />
- <Cell x={1} y={1} />
- <Cell x={2} y={1} />
- <Cell x={3} y={1} right="solid" />
- <Cell x={0} y={2} left="door" />
- <Cell x={1} y={2} />
- <Cell x={2} y={2} />
- <Cell x={3} y={2} right="door" />
- <Cell x={0} y={3} bottom="solid" left="solid" />
- <Cell x={1} y={3} bottom="solid" />
- <Cell x={2} y={3} bottom="solid" />
- <Cell x={3} y={3} bottom="solid" right="solid" />
- </Room>
- <Room x={7} y={2}>
- <Cell x={0} y={0} left="solid" top="solid" />
- <Cell x={1} y={0} top="solid" />
- <Cell x={2} y={0} right="solid" top="solid" />
- <Cell x={0} y={1} left="door" />
- <Cell x={1} y={1} />
- <Cell x={2} y={1} right="door" />
- <Cell x={0} y={2} bottom="solid" left="solid" />
- <Cell x={1} y={2} bottom="solid" />
- <Cell x={2} y={2} bottom="solid" right="solid" />
- </Room>
- <Room x={14} y={0}>
- <Cell x={0} y={0} left="door" top="solid" />
- <Cell x={1} y={0} top="solid" />
- <Cell x={2} y={0} right="door" top="solid" />
- <Cell x={1} y={1} bottom="solid" left="door" />
- <Cell x={2} y={1} bottom="door" right="solid" />
- </Room>
- <Room type="save" x={14} y={1}>
- <Cell bottom="solid" left="solid" right="door" top="solid" />
- </Room>
- <Room x={14} y={2}>
- <Cell x={0} y={0} bottom="solid" left="door" top="solid" />
- <Cell x={1} y={0} bottom="solid" right="door" top="solid" />
- </Room>
- <Room x={16} y={2}>
- <Cell bottom="solid" left="door" right="solid" top="door" />
- </Room>
- <Room x={23} y={0}>
- <Cell bottom="solid" left="solid" right="door" top="solid" />
- </Room>
- <Room x={30} y={0}>
- <Cell x={0} y={0} left="solid" top="solid" />
- <Cell x={1} y={0} top="solid" />
- <Cell x={2} y={0} right="solid" top="solid" />
- <Cell x={0} y={1} left="door" />
- <Cell x={1} y={1} />
- <Cell x={2} y={1} right="door" />
- <Cell x={0} y={2} bottom="solid" left="solid" />
- <Cell x={1} y={2} bottom="solid" />
- <Cell x={2} y={2} bottom="solid" right="solid" />
- </Room>
- <Room type="transition left" x={37} y={4}>
- <Cell bottom="solid" left="door" right="door" top="solid" />
- </Room>
- <Room x={38} y={3}>
- <Cell x={0} y={0} left="solid" top="solid" />
- <Cell x={1} y={0} top="solid" />
- <Cell x={2} y={0} right="solid" top="solid" />
- <Cell x={0} y={1} left="door" />
- <Cell x={1} y={1} />
- <Cell x={2} y={1} right="door" />
- <Cell x={0} y={2} bottom="solid" left="solid" />
- <Cell x={1} y={2} bottom="solid" />
- <Cell x={2} y={2} bottom="solid" right="solid" />
- </Room>
- <Room x={43} y={7}>
- <Cell x={0} y={0} left="solid" top="solid" />
- <Cell x={1} y={0} top="solid" />
- <Cell x={2} y={0} right="solid" top="solid" />
- <Cell x={0} y={1} left="door" />
- <Cell x={1} y={1} />
- <Cell x={2} y={1} right="door" />
- <Cell x={0} y={2} bottom="solid" left="solid" />
- <Cell x={1} y={2} bottom="solid" />
- <Cell x={2} y={2} bottom="solid" right="solid" />
- </Room>
- </Region>;
-
-FloatingGarden.propTypes = {
- x: PropTypes.number,
- y: PropTypes.number,
-};
-
-export default FloatingGarden;
+++ /dev/null
-import PropTypes from 'prop-types';
-import React from 'react';
-
-import Cell from './Cell';
-import Region from './Region';
-import Room from './Room';
-
-const ForbiddenArea = ({ x, y }) =>
- <Region name="forbidden-area" x={x} y={y}>
- <Room type="transition left" x={0} y={2}>
- <Cell bottom="solid" left="door" right="door" top="solid" />
- </Room>
- <Room x={1} y={2}>
- <Cell x={0} y={0} bottom="solid" left="door" top="solid" />
- <Cell x={1} y={0} bottom="solid" top="solid" />
- <Cell x={2} y={0} bottom="solid" top="solid" />
- <Cell x={3} y={0} bottom="solid" right="door" top="solid" />
- </Room>
- <Room x={5} y={1}>
- <Cell x={0} y={0} left="solid" right="solid" top="door" />
- <Cell x={0} y={1} left="door" right="door" bottom="solid" />
- </Room>
- <Room x={5} y={0}>
- <Cell bottom="door" left="solid" right="door" top="solid" />
- </Room>
- <Room type="transition right" x={6} y={0}>
- <Cell bottom="solid" left="door" right="door" top="solid" />
- </Room>
- <Room x={6} y={2}>
- <Cell x={0} y={0} bottom="solid" left="door" top="solid" />
- <Cell x={1} y={0} bottom="solid" top="solid" />
- <Cell x={2} y={0} bottom="solid" top="solid" />
- <Cell x={3} y={0} bottom="solid" top="solid" />
- <Cell x={4} y={0} bottom="door" right="solid" top="solid" />
- </Room>
- <Room x={10} y={3}>
- <Cell x={0} y={0} left="solid" top="door" />
- <Cell x={1} y={0} top="solid" />
- <Cell x={2} y={0} right="solid" top="solid" />
- <Cell x={0} y={1} bottom="solid" left="door" />
- <Cell x={1} y={1} bottom="solid" />
- <Cell x={2} y={1} bottom="solid" right="door" />
- </Room>
- <Room type="secret" x={9} y={4}>
- <Cell bottom="solid" left="solid" right="door" top="solid" />
- </Room>
- <Room x={13} y={4}>
- <Cell bottom="door" left="door" right="solid" top="solid" />
- </Room>
- <Room x={13} y={5}>
- <Cell x={0} y={0} left="solid" right="solid" top="door" />
- <Cell x={0} y={1} left="door" right="solid" bottom="solid" />
- </Room>
- <Room x={5} y={6}>
- <Cell x={0} y={0} bottom="solid" left="door" top="solid" />
- <Cell x={1} y={0} bottom="solid" top="solid" />
- <Cell x={2} y={0} bottom="solid" top="solid" />
- <Cell x={3} y={0} bottom="solid" top="solid" />
- <Cell x={4} y={0} bottom="solid" top="solid" />
- <Cell x={5} y={0} bottom="solid" top="solid" />
- <Cell x={6} y={0} bottom="solid" top="solid" />
- <Cell x={7} y={0} bottom="solid" right="door" top="solid" />
- </Room>
- <Room x={4} y={5}>
- <Cell x={0} y={0} left="solid" right="door" top="solid" />
- <Cell x={0} y={1} left="solid" right="door" bottom="solid" />
- </Room>
- <Room x={5} y={5}>
- <Cell bottom="solid" left="door" right="solid" top="solid" />
- </Room>
- </Region>;
-
-ForbiddenArea.propTypes = {
- x: PropTypes.number,
- y: PropTypes.number,
-};
-
-export default ForbiddenArea;
+++ /dev/null
-import PropTypes from 'prop-types';
-import React from 'react';
-
-import Cell from './Cell';
-import Region from './Region';
-import Room from './Room';
-
-const InnerQuarters = ({ x, y }) =>
- <Region name="inner-quarters" x={x} y={y}>
- <Room x={6} y={0}>
- <Cell x={0} y={0} left="solid" top="solid" />
- <Cell x={1} y={0} top="solid" />
- <Cell x={2} y={0} right="solid" top="solid" />
- <Cell x={0} y={1} left="solid" />
- <Cell x={1} y={1} />
- <Cell x={2} y={1} right="solid" />
- <Cell x={0} y={2} left="solid" />
- <Cell x={1} y={2} />
- <Cell x={2} y={2} right="solid" />
- <Cell x={0} y={3} left="solid" />
- <Cell x={1} y={3} />
- <Cell x={2} y={3} right="solid" />
- <Cell x={0} y={4} bottom="solid" left="solid" />
- <Cell x={1} y={4} bottom="solid" />
- <Cell x={2} y={4} bottom="door" right="solid" />
- </Room>
- <Room x={0} y={4}>
- <Cell x={0} y={0} bottom="door" left="solid" top="solid" />
- <Cell x={1} y={0} bottom="solid" right="solid" top="solid" />
- </Room>
- <Room x={0} y={5}>
- <Cell x={0} y={0} left="solid" top="door" />
- <Cell x={1} y={0} right="solid" top="solid" />
- <Cell x={0} y={1} left="solid" />
- <Cell x={1} y={1} right="door" />
- <Cell x={0} y={2} bottom="solid" left="solid" />
- <Cell x={1} y={2} bottom="solid" right="solid" />
- </Room>
- <Room x={2} y={6}>
- <Cell x={0} y={0} bottom="solid" left="door" top="solid" />
- <Cell x={1} y={0} bottom="solid" right="door" top="solid" />
- </Room>
- <Room type="save" x={3} y={5}>
- <Cell bottom="solid" left="solid" right="door" top="solid" />
- </Room>
- <Room x={4} y={5}>
- <Cell x={0} y={0} left="door" right="door" top="solid" />
- <Cell x={0} y={1} left="door" right="door" />
- <Cell x={0} y={2} left="solid" right="solid" />
- <Cell x={0} y={3} bottom="door" left="door" right="solid" />
- </Room>
- <Room x={5} y={5}>
- <Cell bottom="solid" left="door" right="door" top="solid" />
- </Room>
- <Room x={6} y={5}>
- <Cell x={0} y={0} bottom="solid" left="door" top="solid" />
- <Cell x={1} y={0} bottom="solid" right="door" top="solid" />
- </Room>
- <Room x={5} y={6}>
- <Cell bottom="solid" left="door" right="solid" top="solid" />
- </Room>
- <Room x={6} y={6}>
- <Cell x={0} y={0} bottom="solid" left="solid" top="solid" />
- <Cell x={1} y={0} bottom="solid" right="door" top="solid" />
- </Room>
- <Room x={8} y={5}>
- <Cell x={0} y={0} left="door" top="door" />
- <Cell x={1} y={0} right="door" top="solid" />
- <Cell x={0} y={1} bottom="solid" left="door" />
- <Cell x={1} y={1} bottom="solid" right="solid" />
- </Room>
- <Room x={10} y={5}>
- <Cell x={0} y={0} left="door" right="solid" top="solid" />
- <Cell x={0} y={1} left="solid" right="solid" />
- <Cell x={0} y={2} bottom="door" left="door" right="solid" />
- </Room>
- <Room type="teleporter" x={5} y={7}>
- <Cell bottom="solid" left="solid" right="door" top="solid" />
- </Room>
- <Room x={6} y={7}>
- <Cell x={0} y={0} bottom="solid" left="door" top="solid" />
- <Cell x={1} y={0} bottom="solid" top="solid" />
- <Cell x={2} y={0} bottom="solid" top="solid" />
- <Cell x={3} y={0} bottom="solid" right="door" top="solid" />
- </Room>
- <Room x={5} y={8}>
- <Cell x={0} y={0} bottom="solid" left="door" top="solid" />
- <Cell x={1} y={0} bottom="solid" top="solid" />
- <Cell x={2} y={0} bottom="solid" top="solid" />
- <Cell x={3} y={0} bottom="door" top="solid" />
- <Cell x={4} y={0} bottom="solid" top="solid" />
- <Cell x={5} y={0} bottom="door" right="door" top="door" />
- </Room>
- <Room x={11} y={8}>
- <Cell x={0} y={0} bottom="solid" left="door" top="solid" />
- <Cell x={1} y={0} bottom="solid" right="door" top="solid" />
- </Room>
- <Room type="transition right" x={13} y={8}>
- <Cell bottom="solid" left="door" right="door" top="solid" />
- </Room>
- <Room type="transition left" x={2} y={9}>
- <Cell bottom="solid" left="door" right="door" top="solid" />
- </Room>
- <Room x={3} y={8}>
- <Cell x={0} y={0} left="solid" right="door" top="solid" />
- <Cell x={0} y={1} bottom="solid" left="door" right="solid" />
- </Room>
- <Room type="secret" x={4} y={9}>
- <Cell bottom="solid" left="solid" right="door" top="door" />
- </Room>
- <Room type="secret" x={5} y={9}>
- <Cell bottom="solid" left="door" right="solid" top="solid" />
- </Room>
- <Room type="transition left" x={7} y={9}>
- <Cell bottom="solid" left="door" right="door" top="solid" />
- </Room>
- <Room x={8} y={9}>
- <Cell bottom="solid" left="door" right="solid" top="door" />
- </Room>
- <Room x={9} y={9}>
- <Cell x={0} y={0} bottom="solid" left="solid" top="solid" />
- <Cell x={1} y={0} bottom="solid" right="solid" top="door" />
- </Room>
- </Region>;
-
-InnerQuarters.propTypes = {
- x: PropTypes.number,
- y: PropTypes.number,
-};
-
-export default InnerQuarters;
+++ /dev/null
-import React from 'react';
-
-import Arena from './Arena';
-import CastleCorridor from './CastleCorridor';
-import Chapel from './Chapel';
-import ClockTower from './ClockTower';
-import DanceHall from './DanceHall';
-import FloatingGarden from './FloatingGarden';
-import ForbiddenArea from './ForbiddenArea';
-import InnerQuarters from './InnerQuarters';
-import Study from './Study';
-import TopFloor from './TopFloor';
-import UndergroundCemetery from './UndergroundCemetery';
-import UndergroundReservoir from './UndergroundReservoir';
-
-const Map = () =>
- <svg
- viewBox="0 0 55 43"
- xmlns="http://www.w3.org/2000/svg"
- >
- <style>{`
- .background {
- fill: #0000a0;
- }
- .region:hover .default .background {
- fill: #0000e0;
- }
- .save .background {
- fill: #f80000;
- }
- .secret .background {
- fill: #ff8040;
- }
- .teleporter .background {
- fill: #f8f800;
- }
- .transition .background {
- fill: #800080;
- }
- .corner {
- fill: #f8f8f8;
- }
- .wall {
- stroke: #f8f8f8;
- stroke-linecap: butt;
- stroke-width: 0.125;
- }
- .wall.door {
- stroke: #008888;
- }
- `}</style>
- <rect width="100%" height="100%" fill="#280078" />
- <CastleCorridor x={1} y={18} />
- <Chapel x={43} y={18} />
- <Study x={44} y={29} />
- <DanceHall x={2} y={11} />
- <InnerQuarters x={14} y={6} />
- <FloatingGarden x={6} y={1} />
- <ClockTower x={37} y={8} />
- <UndergroundReservoir x={6} y={27} />
- <UndergroundCemetery x={21} y={40} />
- <Arena x={1} y={34} />
- <ForbiddenArea x={36} y={34} />
- <TopFloor x={28} y={4} />
- </svg>;
-
-export default Map;
+++ /dev/null
-import PropTypes from 'prop-types';
-import React from 'react';
-
-const Region = ({ children, name, x, y }) =>
- <g
- className={`region ${name || ''}`}
- transform={x || y ? `translate(${x || 0}, ${y || 0})` : undefined}
- >
- {children}
- </g>;
-
-Region.propTypes = {
- children: PropTypes.node,
- name: PropTypes.string,
- x: PropTypes.number,
- y: PropTypes.number,
-};
-
-export default Region;
+++ /dev/null
-import PropTypes from 'prop-types';
-import React from 'react';
-
-const Room = ({ children, type, x, y }) =>
- <g
- className={`room ${type || 'default'}`}
- transform={x || y ? `translate(${x || 0}, ${y || 0})` : undefined}
- >
- {children}
- </g>;
-
-Room.propTypes = {
- children: PropTypes.node,
- type: PropTypes.string,
- x: PropTypes.number,
- y: PropTypes.number,
-};
-
-export default Room;
+++ /dev/null
-import PropTypes from 'prop-types';
-import React from 'react';
-
-import Cell from './Cell';
-import Region from './Region';
-import Room from './Room';
-
-const Study = ({ x, y }) =>
- <Region name="study" x={x} y={y}>
- <Room type="transition left" x={3} y={0}>
- <Cell bottom="solid" left="door" right="door" top="solid" />
- </Room>
- <Room x={4} y={0}>
- <Cell x={0} y={0} left="door" right="door" top="solid" />
- <Cell x={0} y={1} bottom="door" left="solid" right="solid" />
- </Room>
- <Room x={5} y={0}>
- <Cell x={0} y={0} bottom="solid" left="door" top="solid" />
- <Cell x={1} y={0} bottom="door" right="door" top="solid" />
- </Room>
- <Room x={5} y={1}>
- <Cell x={0} y={0} bottom="solid" left="solid" top="solid" />
- <Cell x={1} y={0} bottom="solid" right="door" top="solid" />
- </Room>
- <Room x={7} y={0}>
- <Cell x={0} y={0} left="door" right="door" top="solid" />
- <Cell x={0} y={1} bottom="solid" left="door" right="solid" />
- </Room>
- <Room x={8} y={0}>
- <Cell bottom="solid" left="door" right="solid" top="solid" />
- </Room>
- <Room x={8} y={1}>
- <Cell x={0} y={0} bottom="solid" left="solid" top="solid" />
- <Cell x={1} y={0} bottom="door" right="solid" top="solid" />
- </Room>
- <Room x={8} y={2}>
- <Cell x={0} y={0} left="door" top="solid" />
- <Cell x={1} y={0} right="solid" top="door" />
- <Cell x={0} y={1} bottom="solid" left="door" />
- <Cell x={1} y={1} bottom="solid" right="solid" />
- </Room>
- <Room x={3} y={2}>
- <Cell x={0} y={0} bottom="solid" left="solid" top="solid" />
- <Cell x={1} y={0} bottom="solid" top="door" />
- <Cell x={2} y={0} bottom="solid" top="solid" />
- <Cell x={3} y={0} bottom="solid" top="solid" />
- <Cell x={4} y={0} bottom="solid" right="door" top="solid" />
- </Room>
- <Room x={1} y={2}>
- <Cell x={0} y={0} left="door" top="solid" />
- <Cell x={1} y={0} right="solid" top="solid" />
- <Cell x={0} y={1} bottom="solid" left="solid" />
- <Cell x={1} y={1} bottom="solid" right="door" />
- </Room>
- <Room type="secret" x={0} y={2}>
- <Cell bottom="solid" left="solid" right="door" top="solid" />
- </Room>
- <Room x={3} y={3}>
- <Cell x={0} y={0} bottom="solid" left="door" top="solid" />
- <Cell x={1} y={0} bottom="solid" top="solid" />
- <Cell x={2} y={0} bottom="solid" top="solid" />
- <Cell x={3} y={0} bottom="solid" top="solid" />
- <Cell x={4} y={0} bottom="solid" right="door" top="solid" />
- </Room>
- <Room x={1} y={4}>
- <Cell x={0} y={0} left="door" top="door" />
- <Cell x={1} y={0} right="door" top="solid" />
- <Cell x={0} y={1} bottom="solid" left="door" />
- <Cell x={1} y={1} bottom="solid" right="solid" />
- </Room>
- <Room type="save" x={0} y={4}>
- <Cell bottom="solid" left="solid" right="door" top="solid" />
- </Room>
- <Room type="transition left" x={0} y={5}>
- <Cell bottom="solid" left="door" right="door" top="solid" />
- </Room>
- <Room x={3} y={4}>
- <Cell bottom="solid" left="door" right="door" top="solid" />
- </Room>
- <Room x={3} y={5}>
- <Cell bottom="solid" left="solid" right="door" top="solid" />
- </Room>
- <Room x={4} y={4}>
- <Cell x={0} y={0} bottom="solid" left="door" top="solid" />
- <Cell x={1} y={0} bottom="solid" right="door" top="solid" />
- </Room>
- <Room x={4} y={5}>
- <Cell x={0} y={0} bottom="solid" left="door" top="solid" />
- <Cell x={1} y={0} bottom="solid" right="door" top="solid" />
- </Room>
- <Room x={6} y={4}>
- <Cell x={0} y={0} left="door" right="door" top="solid" />
- <Cell x={0} y={1} bottom="solid" left="door" right="door" />
- </Room>
- <Room x={7} y={4}>
- <Cell bottom="solid" left="door" right="solid" top="solid" />
- </Room>
- <Room x={7} y={5}>
- <Cell bottom="solid" left="door" right="door" top="solid" />
- </Room>
- <Room x={8} y={4}>
- <Cell x={0} y={0} left="solid" top="solid" />
- <Cell x={1} y={0} right="solid" top="solid" />
- <Cell x={0} y={1} bottom="solid" left="door" />
- <Cell x={1} y={1} bottom="solid" right="solid" />
- </Room>
- </Region>;
-
-Study.propTypes = {
- x: PropTypes.number,
- y: PropTypes.number,
-};
-
-export default Study;
+++ /dev/null
-import PropTypes from 'prop-types';
-import React from 'react';
-
-import Cell from './Cell';
-import Region from './Region';
-import Room from './Room';
-
-const TopFloor = ({ x, y }) =>
- <Region name="top-floor" x={x} y={y}>
- <Room x={0} y={0}>
- <Cell bottom="solid" left="solid" right="door" top="solid" />
- </Room>
- <Room x={1} y={0}>
- <Cell bottom="solid" left="door" right="door" top="solid" />
- </Room>
- <Room x={0} y={0}>
- <Cell x={2} y={0} left="door" top="solid" />
- <Cell x={3} y={0} right="solid" top="solid" />
- <Cell x={0} y={1} bottom="solid" left="solid" top="solid" />
- <Cell x={1} y={1} bottom="solid" top="solid" />
- <Cell x={2} y={1} bottom="door" />
- <Cell x={3} y={1} bottom="solid" right="door" />
- </Room>
- <Room x={4} y={1}>
- <Cell x={0} y={0} left="door" right="door" top="solid" />
- <Cell x={0} y={1} bottom="door" left="solid" right="door" />
- </Room>
- <Room x={5} y={1}>
- <Cell bottom="solid" left="door" right="solid" top="solid" />
- </Room>
- <Room x={5} y={2}>
- <Cell bottom="solid" left="door" right="solid" top="solid" />
- </Room>
- <Room x={0} y={2}>
- <Cell x={0} y={0} left="solid" top="solid" />
- <Cell x={1} y={0} top="solid" />
- <Cell x={2} y={0} top="door" />
- <Cell x={3} y={0} right="door" top="solid" />
- <Cell x={0} y={1} left="solid" />
- <Cell x={1} y={1} />
- <Cell x={2} y={1} />
- <Cell x={3} y={1} right="solid" />
- <Cell x={0} y={2} left="solid" />
- <Cell x={1} y={2} />
- <Cell x={2} y={2} />
- <Cell x={3} y={2} right="door" />
- <Cell x={0} y={3} bottom="solid" left="solid" />
- <Cell x={1} y={3} bottom="door" />
- <Cell x={2} y={3} bottom="solid" />
- <Cell x={3} y={3} bottom="solid" right="door" />
- </Room>
- <Room x={4} y={3}>
- <Cell x={0} y={0} left="solid" right="door" top="door" />
- <Cell x={0} y={1} bottom="door" left="door" right="door" />
- </Room>
- <Room type="save" x={5} y={3}>
- <Cell bottom="solid" left="door" right="solid" top="solid" />
- </Room>
- <Room x={5} y={4}>
- <Cell x={0} y={0} bottom="solid" left="door" top="solid" />
- <Cell x={1} y={0} bottom="solid" top="solid" />
- <Cell x={2} y={0} bottom="solid" right="door" top="solid" />
- </Room>
- <Room type="transition right" x={8} y={4}>
- <Cell bottom="solid" left="door" right="door" top="solid" />
- </Room>
- <Room x={4} y={5}>
- <Cell x={0} y={0} left="door" top="door" />
- <Cell x={1} y={0} right="solid" top="solid" />
- <Cell x={0} y={1} bottom="solid" left="solid" />
- <Cell x={1} y={1} bottom="door" right="solid" />
- </Room>
- <Room type="secret" x={0} y={6}>
- <Cell bottom="door" left="solid" right="solid" top="solid" />
- </Room>
- <Room x={1} y={6}>
- <Cell x={0} y={0} bottom="solid" left="solid" top="door" />
- <Cell x={1} y={0} bottom="solid" right="door" top="solid" />
- </Room>
- <Room type="secret" x={3} y={6}>
- <Cell bottom="solid" left="door" right="solid" top="solid" />
- </Room>
- <Room x={0} y={7}>
- <Cell x={0} y={0} left="solid" top="door" />
- <Cell x={1} y={0} right="door" top="solid" />
- <Cell x={0} y={1} bottom="solid" left="solid" />
- <Cell x={1} y={1} bottom="solid" right="door" />
- </Room>
- <Room x={2} y={7}>
- <Cell x={0} y={0} bottom="solid" left="door" top="solid" />
- <Cell x={1} y={0} bottom="solid" right="door" top="solid" />
- </Room>
- <Room x={4} y={7}>
- <Cell x={0} y={0} bottom="solid" left="door" top="solid" />
- <Cell x={1} y={0} bottom="solid" right="door" top="door" />
- </Room>
- <Room x={6} y={7}>
- <Cell x={0} y={0} left="door" right="door" top="solid" />
- <Cell x={0} y={1} left="solid" right="door" />
- <Cell x={0} y={2} bottom="solid" right="door" left="door" />
- </Room>
- <Room x={7} y={7}>
- <Cell bottom="solid" left="door" right="solid" top="solid" />
- </Room>
- <Room x={2} y={8}>
- <Cell x={0} y={0} bottom="door" left="door" top="solid" />
- <Cell x={1} y={0} bottom="solid" right="solid" top="solid" />
- </Room>
- <Room x={4} y={8}>
- <Cell x={0} y={0} left="solid" top="solid" />
- <Cell x={1} y={0} right="solid" top="solid" />
- <Cell x={0} y={1} bottom="solid" left="door" />
- <Cell x={1} y={1} bottom="solid" right="door" />
- </Room>
- <Room type="teleporter" x={7} y={8}>
- <Cell bottom="solid" left="door" right="solid" top="solid" />
- </Room>
- <Room x={2} y={9}>
- <Cell x={0} y={0} bottom="solid" left="solid" top="door" />
- <Cell x={1} y={0} bottom="door" right="door" top="solid" />
- </Room>
- <Room x={7} y={9}>
- <Cell bottom="solid" left="door" right="solid" top="solid" />
- </Room>
- <Room type="transition left" x={1} y={10}>
- <Cell bottom="solid" left="door" right="door" top="solid" />
- </Room>
- <Room x={2} y={10}>
- <Cell x={0} y={0} bottom="solid" left="door" top="solid" />
- <Cell x={1} y={0} bottom="solid" right="door" top="door" />
- </Room>
- <Room type="transition right" x={4} y={10}>
- <Cell bottom="solid" left="door" right="door" top="solid" />
- </Room>
- </Region>;
-
-TopFloor.propTypes = {
- x: PropTypes.number,
- y: PropTypes.number,
-};
-
-export default TopFloor;
+++ /dev/null
-import PropTypes from 'prop-types';
-import React from 'react';
-
-import Cell from './Cell';
-import Region from './Region';
-import Room from './Room';
-
-const UndergroundCemetery = ({ x, y }) =>
- <Region name="underground-cemetery" x={x} y={y}>
- <Room x={2} y={0}>
- <Cell x={0} y={0} bottom="solid" left="solid" top="solid" />
- <Cell x={1} y={0} bottom="solid" top="solid" />
- <Cell x={2} y={0} bottom="solid" top="solid" />
- <Cell x={3} y={0} bottom="solid" right="door" top="solid" />
- </Room>
- <Room x={6} y={0}>
- <Cell x={0} y={0} left="door" right="door" top="solid" />
- <Cell x={0} y={1} bottom="solid" left="door" right="door" />
- </Room>
- <Room type="save" x={7} y={0}>
- <Cell bottom="solid" left="door" right="solid" top="solid" />
- </Room>
- <Room x={8} y={0}>
- <Cell x={0} y={0} left="solid" top="solid" />
- <Cell x={1} y={0} right="solid" top="solid" />
- <Cell x={0} y={1} left="door" bottom="solid" />
- <Cell x={1} y={1} bottom="solid" right="door" />
- </Room>
- <Room x={10} y={0}>
- <Cell bottom="solid" left="solid" right="door" top="solid" />
- </Room>
- <Room x={11} y={0}>
- <Cell x={0} y={0} left="door" right="door" top="solid" />
- <Cell x={0} y={1} bottom="solid" left="door" right="door" />
- </Room>
- <Room x={12} y={0}>
- <Cell x={0} y={0} bottom="solid" left="door" top="solid" />
- <Cell x={1} y={0} bottom="solid" top="solid" />
- <Cell x={2} y={0} bottom="solid" top="solid" />
- <Cell x={3} y={0} bottom="solid" right="solid" top="solid" />
- </Room>
- <Room type="transition left" x={0} y={1}>
- <Cell x={0} y={0} bottom="solid" left="door" top="solid" />
- <Cell x={1} y={0} bottom="solid" right="door" top="solid" />
- </Room>
- <Room x={2} y={1}>
- <Cell x={0} y={0} bottom="solid" left="door" top="solid" />
- <Cell x={1} y={0} bottom="solid" top="solid" />
- <Cell x={2} y={0} bottom="solid" top="solid" />
- <Cell x={3} y={0} bottom="solid" right="door" top="solid" />
- </Room>
- <Room x={7} y={1}>
- <Cell bottom="solid" left="door" right="door" top="solid" />
- </Room>
- <Room x={10} y={1}>
- <Cell bottom="solid" left="door" right="door" top="solid" />
- </Room>
- <Room x={12} y={1}>
- <Cell x={0} y={0} bottom="solid" left="door" top="solid" />
- <Cell x={1} y={0} bottom="solid" top="solid" />
- <Cell x={2} y={0} bottom="solid" top="solid" />
- <Cell x={3} y={0} bottom="solid" right="door" top="solid" />
- </Room>
- <Room x={16} y={1}>
- <Cell bottom="solid" left="door" right="solid" top="solid" />
- </Room>
- </Region>;
-
-UndergroundCemetery.propTypes = {
- x: PropTypes.number,
- y: PropTypes.number,
-};
-
-export default UndergroundCemetery;
+++ /dev/null
-import PropTypes from 'prop-types';
-import React from 'react';
-
-import Cell from './Cell';
-import Region from './Region';
-import Room from './Room';
-
-const UndergroundReservoir = ({ x, y }) =>
- <Region name="underground-reservoir" x={x} y={y}>
- <Room x={0} y={2}>
- <Cell x={0} y={0} left="solid" right="door" top="solid" />
- <Cell x={0} y={1} bottom="solid" left="solid" right="door" />
- </Room>
- <Room type="transition right" x={1} y={2}>
- <Cell bottom="solid" left="door" right="door" top="solid" />
- </Room>
- <Room x={1} y={3}>
- <Cell x={0} y={0} bottom="solid" left="door" top="solid" />
- <Cell x={1} y={0} bottom="solid" top="solid" />
- <Cell x={2} y={0} bottom="solid" top="solid" />
- <Cell x={3} y={0} bottom="solid" top="solid" />
- <Cell x={4} y={0} bottom="solid" top="solid" />
- <Cell x={5} y={0} bottom="solid" top="solid" />
- <Cell x={6} y={0} bottom="solid" top="solid" />
- <Cell x={7} y={0} bottom="solid" top="door" />
- <Cell x={8} y={0} bottom="solid" top="solid" />
- <Cell x={9} y={0} bottom="door" right="solid" top="solid" />
- </Room>
- <Room x={7} y={2}>
- <Cell x={0} y={0} bottom="solid" left="solid" top="solid" />
- <Cell x={1} y={0} bottom="door" right="solid" top="solid" />
- </Room>
- <Room x={9} y={5}>
- <Cell bottom="solid" left="solid" right="door" top="solid" />
- </Room>
- <Room x={10} y={4}>
- <Cell x={0} y={0} left="solid" top="door" />
- <Cell x={1} y={0} right="door" top="solid" />
- <Cell x={0} y={1} bottom="solid" left="door" />
- <Cell x={1} y={1} bottom="solid" right="solid" />
- </Room>
- <Room x={12} y={4}>
- <Cell x={0} y={0} left="door" right="door" top="solid" />
- <Cell x={0} y={1} left="solid" right="solid" />
- <Cell x={0} y={2} left="solid" right="solid" />
- <Cell x={0} y={3} left="solid" right="door" />
- <Cell x={0} y={4} left="door" right="solid" />
- <Cell x={0} y={5} left="solid" right="solid" />
- <Cell x={0} y={6} bottom="door" left="solid" right="door" />
- </Room>
- <Room type="save" x={13} y={7}>
- <Cell bottom="solid" left="door" right="solid" top="solid" />
- </Room>
- <Room x={11} y={8}>
- <Cell bottom="solid" left="solid" right="door" top="solid" />
- </Room>
- <Room x={13} y={10}>
- <Cell x={0} y={0} bottom="solid" left="door" top="solid" />
- <Cell x={1} y={0} bottom="solid" top="solid" />
- <Cell x={2} y={0} bottom="solid" top="solid" />
- <Cell x={3} y={0} bottom="solid" right="door" top="solid" />
- </Room>
- <Room x={12} y={11}>
- <Cell x={0} y={0} bottom="solid" left="door" top="door" />
- <Cell x={1} y={0} bottom="solid" top="solid" />
- <Cell x={2} y={0} bottom="solid" top="solid" />
- <Cell x={3} y={0} bottom="solid" top="solid" />
- <Cell x={4} y={0} bottom="solid" top="solid" />
- <Cell x={5} y={0} bottom="solid" top="solid" />
- <Cell x={6} y={0} bottom="solid" top="solid" />
- <Cell x={7} y={0} bottom="solid" right="door" top="solid" />
- </Room>
- <Room x={11} y={11}>
- <Cell x={0} y={0} left="door" right="door" top="solid" />
- <Cell x={0} y={1} left="solid" right="solid" />
- <Cell x={0} y={2} left="solid" right="solid" />
- <Cell x={0} y={3} bottom="solid" left="door" right="door" />
- </Room>
- <Room x={10} y={11}>
- <Cell bottom="solid" left="door" right="door" top="solid" />
- </Room>
- <Room x={9} y={11}>
- <Cell x={0} y={0} left="door" right="door" top="solid" />
- <Cell x={0} y={1} bottom="solid" left="solid" right="door" />
- </Room>
- <Room x={10} y={12}>
- <Cell bottom="solid" left="door" right="solid" top="solid" />
- </Room>
- <Room type="transition left" x={8} y={11}>
- <Cell bottom="solid" left="door" right="door" top="solid" />
- </Room>
- <Room type="secret" x={10} y={14}>
- <Cell bottom="solid" left="solid" right="door" top="solid" />
- </Room>
- <Room type="transition right" x={12} y={14}>
- <Cell x={0} y={0} bottom="solid" left="door" top="solid" />
- <Cell x={1} y={0} bottom="solid" right="door" top="solid" />
- </Room>
- <Room x={13} y={4}>
- <Cell x={0} y={0} left="door" top="solid" />
- <Cell x={1} y={0} top="solid" />
- <Cell x={2} y={0} top="solid" />
- <Cell x={3} y={0} top="solid" />
- <Cell x={4} y={0} right="solid" top="solid" />
- <Cell x={0} y={1} bottom="solid" left="solid" />
- <Cell x={1} y={1} bottom="solid" />
- <Cell x={2} y={1} bottom="solid" />
- <Cell x={3} y={1} bottom="solid" />
- <Cell x={4} y={1} bottom="solid" right="door" />
- </Room>
- <Room x={18} y={5}>
- <Cell x={0} y={0} bottom="solid" left="door" top="solid" />
- <Cell x={1} y={0} bottom="solid" right="solid" top="door" />
- </Room>
- <Room x={18} y={2}>
- <Cell x={0} y={0} left="door" top="solid" />
- <Cell x={1} y={0} top="solid" />
- <Cell x={2} y={0} top="solid" />
- <Cell x={3} y={0} top="solid" />
- <Cell x={4} y={0} right="door" top="solid" />
- <Cell x={0} y={1} left="solid" />
- <Cell x={1} y={1} />
- <Cell x={2} y={1} />
- <Cell x={3} y={1} />
- <Cell x={4} y={1} right="solid" />
- <Cell x={0} y={2} bottom="solid" left="solid" />
- <Cell x={1} y={2} bottom="door" />
- <Cell x={2} y={2} bottom="solid" />
- <Cell x={3} y={2} bottom="solid" />
- <Cell x={4} y={2} bottom="solid" right="solid" />
- </Room>
- <Room type="transition left" x={17} y={2}>
- <Cell bottom="solid" left="door" right="door" top="solid" />
- </Room>
- <Room x={20} y={5}>
- <Cell bottom="solid" left="door" right="door" top="solid" />
- </Room>
- <Room x={21} y={5}>
- <Cell x={0} y={0} left="door" right="solid" top="solid" />
- <Cell x={0} y={1} left="solid" right="door" />
- <Cell x={0} y={2} left="solid" right="solid" />
- <Cell x={0} y={3} bottom="solid" left="door" right="door" />
- </Room>
- <Room x={22} y={6}>
- <Cell bottom="solid" left="door" right="solid" top="solid" />
- </Room>
- <Room type="save" x={22} y={8}>
- <Cell bottom="solid" left="door" right="solid" top="solid" />
- </Room>
- <Room x={19} y={8}>
- <Cell x={0} y={0} bottom="solid" left="door" top="solid" />
- <Cell x={1} y={0} bottom="solid" right="door" top="solid" />
- </Room>
- <Room x={23} y={2}>
- <Cell x={0} y={0} bottom="solid" left="door" top="solid" />
- <Cell x={1} y={0} bottom="solid" right="door" top="solid" />
- </Room>
- <Room x={25} y={1}>
- <Cell x={0} y={0} left="solid" top="solid" />
- <Cell x={1} y={0} right="solid" top="solid" />
- <Cell x={0} y={1} left="door" />
- <Cell x={1} y={1} right="door" />
- <Cell x={0} y={2} left="solid" />
- <Cell x={1} y={2} right="solid" />
- <Cell x={0} y={3} bottom="solid" left="solid" />
- <Cell x={1} y={3} bottom="door" right="solid" />
- </Room>
- <Room x={27} y={2}>
- <Cell bottom="solid" left="door" right="door" top="solid" />
- </Room>
- <Room x={28} y={2}>
- <Cell x={0} y={0} left="door" top="solid" />
- <Cell x={1} y={0} top="door" />
- <Cell x={2} y={0} right="door" top="solid" />
- <Cell x={0} y={1} left="solid" />
- <Cell x={1} y={1} />
- <Cell x={2} y={1} right="solid" />
- <Cell x={0} y={2} bottom="door" left="solid" />
- <Cell x={1} y={2} bottom="solid" />
- <Cell x={2} y={2} bottom="door" right="solid" />
- </Room>
- <Room x={29} y={0}>
- <Cell x={0} y={0} left="solid" right="solid" top="solid" />
- <Cell x={0} y={1} bottom="door" left="solid" right="solid" />
- </Room>
- <Room x={31} y={2}>
- <Cell x={0} y={0} bottom="solid" left="door" top="solid" />
- <Cell x={1} y={0} bottom="solid" right="solid" top="solid" />
- </Room>
- <Room x={30} y={5}>
- <Cell x={0} y={0} left="solid" right="solid" top="door" />
- <Cell x={0} y={1} bottom="solid" left="solid" right="door" />
- </Room>
- <Room type="secret" x={31} y={6}>
- <Cell bottom="solid" left="door" right="solid" top="solid" />
- </Room>
- <Room x={27} y={5}>
- <Cell x={0} y={0} bottom="solid" left="door" top="solid" />
- <Cell x={1} y={0} bottom="solid" right="solid" top="door" />
- </Room>
- <Room x={25} y={5}>
- <Cell x={0} y={0} left="door" top="solid" />
- <Cell x={1} y={0} right="door" top="door" />
- <Cell x={0} y={1} left="solid" />
- <Cell x={1} y={1} right="solid" />
- <Cell x={0} y={2} left="solid" />
- <Cell x={1} y={2} right="door" />
- <Cell x={0} y={3} left="solid" />
- <Cell x={1} y={3} right="solid" />
- <Cell x={0} y={4} bottom="solid" left="door" />
- <Cell x={1} y={4} bottom="door" right="door" />
- </Room>
- <Room x={24} y={5}>
- <Cell bottom="solid" left="solid" right="door" top="solid" />
- </Room>
- <Room x={27} y={7}>
- <Cell bottom="solid" left="door" right="solid" top="solid" />
- </Room>
- <Room x={27} y={9}>
- <Cell bottom="solid" left="door" right="door" top="solid" />
- </Room>
- <Room type="transition right" x={28} y={9}>
- <Cell bottom="solid" left="door" right="door" top="solid" />
- </Room>
- <Room x={22} y={9}>
- <Cell x={0} y={0} bottom="solid" left="door" top="solid" />
- <Cell x={1} y={0} bottom="solid" top="solid" />
- <Cell x={2} y={0} bottom="solid" right="door" top="solid" />
- </Room>
- <Room x={20} y={9}>
- <Cell x={0} y={0} left="door" top="solid" />
- <Cell x={1} y={0} right="door" top="solid" />
- <Cell x={0} y={1} left="door" />
- <Cell x={1} y={1} right="solid" />
- <Cell x={0} y={2} bottom="solid" left="door" />
- <Cell x={1} y={2} bottom="solid" right="door" />
- </Room>
- <Room x={22} y={11}>
- <Cell x={0} y={0} bottom="solid" left="door" top="solid" />
- <Cell x={1} y={0} bottom="solid" top="solid" />
- <Cell x={2} y={0} bottom="solid" right="solid" top="solid" />
- </Room>
- <Room type="teleporter" x={19} y={9}>
- <Cell bottom="solid" left="solid" right="door" top="solid" />
- </Room>
- <Room x={19} y={10}>
- <Cell bottom="solid" left="door" right="door" top="solid" />
- </Room>
- <Room x={17} y={8}>
- <Cell x={0} y={0} left="solid" top="solid" />
- <Cell x={1} y={0} right="door" top="solid" />
- <Cell x={0} y={1} left="solid" />
- <Cell x={1} y={1} right="solid" />
- <Cell x={0} y={2} bottom="solid" left="door" />
- <Cell x={1} y={2} bottom="solid" right="door" />
- </Room>
- </Region>;
-
-UndergroundReservoir.propTypes = {
- x: PropTypes.number,
- y: PropTypes.number,
-};
-
-export default UndergroundReservoir;
+++ /dev/null
-import axios from 'axios';
-import React, { useEffect, useState } from 'react';
-import { BrowserRouter, Route, Routes } from 'react-router-dom';
-
-import Header from './Header';
-import AosFront from '../pages/AosFront';
-import AosGenerate from '../pages/AosGenerate';
-import AosSeed from '../pages/AosSeed';
-import Tracker from '../pages/AosTracker';
-import User from '../pages/User';
-import AosBaseRomProvider from '../../helpers/AosBaseRomContext';
-import UserContext from '../../helpers/UserContext';
-
-const App = () => {
- const [user, setUser] = useState(null);
-
- const checkAuth = async () => {
- try {
- const response = await axios.get('/api/user');
- setUser(response.data);
- } catch (e) {
- setUser(null);
- }
- };
-
- const doLogout = async () => {
- await axios.post('/logout');
- await checkAuth();
- };
-
- useEffect(() => {
- let timer = null;
- axios
- .get('/sanctum/csrf-cookie')
- .then(() => {
- checkAuth();
- timer = setInterval(checkAuth, 15 * 60 * 1000);
- });
- return () => {
- if (timer) clearInterval(timer);
- };
- }, []);
-
- useEffect(() => {
- window.Echo.channel('App.Control')
- .listen('PleaseRefresh', () => {
- location.reload();
- });
- return () => {
- window.Echo.leave('App.Control');
- };
- }, []);
-
- return <BrowserRouter>
- <AosBaseRomProvider>
- <UserContext.Provider value={user}>
- <Header doLogout={doLogout} />
- <Routes>
- <Route path="generate" element={<AosGenerate />} />
- <Route path="h/:hash" element={<AosSeed />} />
- <Route path="tracker" element={<Tracker />} />
- <Route path="users/:id" element={<User />} />
- <Route path="*" element={<AosFront />} />
- </Routes>
- </UserContext.Provider>
- </AosBaseRomProvider>
- </BrowserRouter>;
-};
-
-export default App;
+++ /dev/null
-import React from 'react';
-import { Button } from 'react-bootstrap';
-import { withTranslation } from 'react-i18next';
-
-import i18n from '../../i18n';
-
-import { useAosBaseRom } from '../../helpers/AosBaseRomContext';
-
-const BaseRomButton = () => {
- const { rom, setRom } = useAosBaseRom();
-
- const handleFile = React.useCallback(async e => {
- if (e.target.files.length != 1) {
- setRom(null);
- } else {
- const buf = await e.target.files[0].arrayBuffer();
- setRom(buf);
- }
- }, [setRom]);
-
- if (rom) return null;
-
- return <span>
- <input
- accept=".gba"
- className="d-none"
- id="aos.baseRom"
- onChange={handleFile}
- type="file"
- />
- <label htmlFor="aos.baseRom">
- <Button as="span" variant="primary">
- {i18n.t('aos.setBaseRom')}
- </Button>
- </label>
- </span>;
-};
-
-export default withTranslation()(BaseRomButton);
+++ /dev/null
-import PropTypes from 'prop-types';
-import React from 'react';
-import { Button, Container, Nav, Navbar } from 'react-bootstrap';
-import { LinkContainer } from 'react-router-bootstrap';
-import { withTranslation } from 'react-i18next';
-
-import BaseRomButton from './BaseRomButton';
-import LanguageSwitcher from '../app/LanguageSwitcher';
-import Icon from '../common/Icon';
-import { getAvatarUrl } from '../../helpers/User';
-import { withUser } from '../../helpers/UserContext';
-import i18n from '../../i18n';
-
-const Header = ({ doLogout, user }) =>
- <Navbar id="header" bg="dark" variant="dark">
- <Container fluid>
- <LinkContainer to="/">
- <Navbar.Brand>
- AoS
- </Navbar.Brand>
- </LinkContainer>
- <Navbar.Text className="ms-auto me-2 button-bar">
- <BaseRomButton />
- <LanguageSwitcher />
- </Navbar.Text>
- <Nav>
- {user ?
- <>
- <LinkContainer to={`/users/${user.id}`}>
- <Nav.Link>
- <img alt="" src={getAvatarUrl(user)} />
- {user.username}
- <span className="text-muted">#{user.discriminator}</span>
- </Nav.Link>
- </LinkContainer>
- <Button
- onClick={doLogout}
- title={i18n.t('button.logout')}
- variant="outline-secondary"
- >
- <Icon.LOGOUT title="" />
- </Button>
- </>
- : null}
- </Nav>
- </Container>
- </Navbar>
-;
-
-Header.propTypes = {
- doLogout: PropTypes.func,
- user: PropTypes.shape({
- avatar: PropTypes.string,
- discriminator: PropTypes.string,
- id: PropTypes.string,
- username: PropTypes.string,
- }),
-};
-
-export default withTranslation()(withUser(Header));
+++ /dev/null
-import FileSaver from 'file-saver';
-import PropTypes from 'prop-types';
-import React from 'react';
-import { Button, Col, Container, Row } from 'react-bootstrap';
-import { withTranslation } from 'react-i18next';
-import toastr from 'toastr';
-
-import BaseRomButton from './BaseRomButton';
-import { useAosBaseRom } from '../../helpers/AosBaseRomContext';
-import BPS from '../../helpers/bps';
-import i18n from '../../i18n';
-
-const applyPatch = (rom, patch, filename) => {
- try {
- const bps = new BPS();
- bps.setPatch(patch);
- bps.setSource(rom);
- const result = bps.applyPatch();
- FileSaver.saveAs(new Blob([result], { type: 'application/octet-stream' }), filename);
- } catch (e) {
- toastr.error(i18n.t('aosSeeds.patchError', { msg: e.message }));
- }
-};
-
-const isDefaultSetting = (name, value) => {
- switch (name) {
- case 'area':
- return value === 'Vanilla';
- case 'boss':
- return value === 'Vanilla';
- case 'doublechaos':
- return value === 'false';
- case 'enemy':
- return value === 'Vanilla';
- case 'grahm':
- return value === 'BookSouls';
- case 'itempool':
- return value === 'Standard';
- case 'kicker':
- return value === 'false';
- case 'levelexp':
- return value === 'Vanilla';
- case 'logic':
- return value === 'AreaTechTiers';
- case 'mapassist':
- return value === 'false';
- case 'nodupes':
- return value === 'false';
- case 'noww':
- return value === 'false';
- case 'palette':
- return value === 'Vanilla';
- case 'panther':
- return value === 'Rand70Dup';
- case 'reqallsouls':
- return value === 'false';
- case 'shopprice':
- return value === 'Vanilla';
- case 'shopSouls':
- return value === 'Vanilla';
- case 'startshop':
- return value === 'Vanilla';
- case 'telestart':
- return value === 'false';
- case 'weight':
- return value === '2.5';
- default:
- return false;
- }
-};
-
-const Seed = ({ onRetry, patch, seed }) => {
- const { rom } = useAosBaseRom();
-
- return <Container>
- <h1>{i18n.t('aosSeeds.heading')}</h1>
- <Row>
- <Col md={{ order: 2 }}>
- {rom ?
- <Button
- disabled={!seed || seed.status !== 'generated' || !patch}
- onClick={() => applyPatch(
- rom,
- patch,
- `${i18n.t('aosSeeds.filename', {
- hash: seed.hash,
- preset: seed.preset,
- })}.gba`,
- )}
- variant="primary"
- >
- {i18n.t(patch ? 'aosSeeds.patch' : 'aosSeeds.fetchingPatch')}
- </Button>
- :
- <BaseRomButton />
- }
- </Col>
- <Col md={{ order: 1 }}>
- <p>
- {i18n.t('aosSeeds.preset')}:
- {' '}
- <strong>{i18n.t(`aosSeeds.presets.${seed.preset}`)}</strong>
- </p>
- {seed.seed ?
- <p>
- {i18n.t('aosSeeds.seed')}:
- {' '}
- <strong>{seed.seed}</strong>
- </p>
- : null}
- {seed.race ?
- <p>{i18n.t('aosSeeds.race')}</p>
- : null}
- {seed.mystery ?
- <p>{i18n.t('aosSeeds.mystery')}</p>
- : null}
- {seed.status === 'generated' ?
- <p>
- {i18n.t('aosSeeds.generated')}:
- {' '}
- <strong>
- {i18n.t('aosSeeds.date', { date: new Date(seed.updated_at) })}
- </strong>
- </p>
- :
- <p>
- {i18n.t('aosSeeds.status')}:
- {' '}
- <strong>{i18n.t(`aosSeeds.statuses.${seed.status}`)}</strong>
- </p>
- }
- {seed.status === 'error' ?
- <p>
- <Button
- onClick={onRetry}
- variant="secondary"
- >
- {i18n.t('button.retry')}
- </Button>
- </p>
- : null}
- </Col>
- </Row>
- <h2 className="mt-5">{i18n.t('aosSeeds.generator')}</h2>
- <p>{i18n.t(`aosSeeds.generators.${seed.generator}`)}</p>
- {seed.settings ? <>
- <h2 className="mt-5">{i18n.t('aosSeeds.settings')}</h2>
- <Row>
- {Object.entries(seed.settings).map(([key, value]) =>
- <Col key={key} sm={4} md={3} lg={2} className="mb-2">
- <small className="text-muted">
- {i18n.t(`aosSeeds.settingName.${key}`)}
- </small>
- <br />
- {isDefaultSetting(key, value) ?
- i18n.t(`aosSeeds.settingValue.${key}.${value}`)
- :
- <strong>{i18n.t(`aosSeeds.settingValue.${key}.${value}`)}</strong>
- }
- </Col>
- )}
- </Row>
- </> : null}
- </Container>;
-};
-
-Seed.propTypes = {
- onRetry: PropTypes.func,
- patch: PropTypes.instanceOf(ArrayBuffer),
- seed: PropTypes.shape({
- generator: PropTypes.string,
- hash: PropTypes.string,
- mystery: PropTypes.bool,
- preset: PropTypes.string,
- race: PropTypes.bool,
- seed: PropTypes.string,
- settings: PropTypes.shape({
- }),
- status: PropTypes.string,
- updated_at: PropTypes.string,
- }),
-};
-
-export default withTranslation()(Seed);
import ErrorMessage from '../common/ErrorMessage';
import Loading from '../common/Loading';
-const AosSeed = () => {
+const AlttpSeed = () => {
const params = useParams();
const { hash } = params;
</ErrorBoundary>;
};
-export default AosSeed;
+export default AlttpSeed;
+++ /dev/null
-import React from 'react';
-import { Button, Col, Container, Row } from 'react-bootstrap';
-import { Helmet } from 'react-helmet';
-import { useTranslation } from 'react-i18next';
-
-import Icon from '../common/Icon';
-
-const authEndpoint = 'https://discord.com/oauth2/authorize';
-const clientId = '951113702839549982';
-const botUrl = `${authEndpoint}?client_id=${clientId}&scope=bot%20applications.commands`;
-const commandUrl = `${authEndpoint}?client_id=${clientId}&scope=applications.commands`;
-
-const AosFront = () => {
- const { t } = useTranslation();
-
- return <Container>
- <Helmet>
- <title>AoS</title>
- <meta name="description" content="Castlevania: Aria of Sorrow" />
- </Helmet>
- <div className="my-5 text-center">
- <h1>Castlevania: Aria of Sorrow</h1>
- </div>
- <Row>
- <Col className="text-center mb-3" sm={6} md={4}>
- <Button
- href="https://discord.gg/VEtVYNr"
- size="lg"
- target="_blank"
- variant="discord"
- >
- <Icon.DISCORD />
- {' '}
- {t('aos.randoDiscord')}
- </Button>
- </Col>
- <Col className="text-center mb-3" sm={6} md={4}>
- <Button
- href="https://aosrando.surge.sh/"
- size="lg"
- target="_blank"
- variant="primary"
- >
- {t('aos.randoWeb')}
- </Button>
- </Col>
- <Col className="text-center mb-3" sm={6} md={4}>
- <Button
- href="https://discord.gg/ApVyJnd"
- size="lg"
- target="_blank"
- variant="discord"
- >
- <Icon.DISCORD />
- {' '}
- {t('aos.tourneyDiscord')}
- </Button>
- </Col>
- <Col className="text-center mb-3" sm={6} md={4}>
- <Button
- href={botUrl}
- size="lg"
- target="_blank"
- variant="discord"
- >
- <Icon.DISCORD />
- {' '}
- {t('aos.inviteBot')}
- </Button>
- </Col>
- <Col className="text-center mb-3" sm={6} md={4}>
- <Button
- href={commandUrl}
- size="lg"
- target="_blank"
- variant="discord"
- >
- <Icon.DISCORD />
- {' '}
- {t('aos.inviteCommand')}
- </Button>
- </Col>
- </Row>
- </Container>;
-};
-
-export default AosFront;
+++ /dev/null
-import axios from 'axios';
-import React, { useCallback, useEffect, useState } from 'react';
-import { Helmet } from 'react-helmet';
-import { useTranslation } from 'react-i18next';
-
-import Generate from '../aos-generate/Generate';
-import ErrorBoundary from '../common/ErrorBoundary';
-import ErrorMessage from '../common/ErrorMessage';
-import Loading from '../common/Loading';
-
-const AosGenerate = () => {
- const [error, setError] = useState(null);
- const [loading, setLoading] = useState(true);
- const [presets, setPresets] = useState([]);
-
- const { t } = useTranslation();
-
- const loadPresets = useCallback(ctrl => {
- axios
- .get('/api/aos-presets', { signal: ctrl.signal })
- .then(response => {
- setError(null);
- setLoading(false);
- setPresets(response.data);
- })
- .catch(error => {
- setError(error);
- setLoading(false);
- setPresets([]);
- });
- }, []);
-
- useEffect(() => {
- setLoading(true);
- const ctrl = new AbortController();
- loadPresets(ctrl);
- return () => {
- ctrl.abort();
- };
- }, []);
-
- if (loading) {
- return <Loading />;
- }
-
- if (error) {
- return <ErrorMessage error={error} />;
- }
-
- return <ErrorBoundary>
- <Helmet>
- <title>{t('aosGenerate.heading')}</title>
- </Helmet>
- <Generate presets={presets} />
- </ErrorBoundary>;
-};
-
-export default AosGenerate;
+++ /dev/null
-import axios from 'axios';
-import React, { useCallback, useEffect, useState } from 'react';
-import { Helmet } from 'react-helmet';
-import { useParams } from 'react-router-dom';
-
-import NotFound from './NotFound';
-import Seed from '../aos/Seed';
-import ErrorBoundary from '../common/ErrorBoundary';
-import ErrorMessage from '../common/ErrorMessage';
-import Loading from '../common/Loading';
-
-const AosSeed = () => {
- const params = useParams();
- const { hash } = params;
-
- const [error, setError] = useState(null);
- const [loading, setLoading] = useState(true);
- const [patch, setPatch] = useState(null);
- const [seed, setSeed] = useState(null);
-
- const loadSeed = useCallback((hash, ctrl) => {
- axios
- .get(`/api/aos-seed/${hash}`, { signal: ctrl.signal })
- .then(response => {
- setError(null);
- setLoading(false);
- setSeed(response.data);
- })
- .catch(error => {
- setError(error);
- setLoading(false);
- setSeed(null);
- });
- }, []);
-
- useEffect(() => {
- setLoading(true);
- const ctrl = new AbortController();
- loadSeed(hash, ctrl);
- return () => {
- ctrl.abort();
- };
- }, [hash]);
-
- useEffect(() => {
- if (!seed || seed.status !== 'pending') {
- return;
- }
- const ctrl = new AbortController();
- const timer = setTimeout(() => {
- loadSeed(seed.hash, ctrl);
- }, 2000);
- return () => {
- clearTimeout(timer);
- ctrl.abort();
- };
- }, [seed]);
-
- useEffect(() => {
- setPatch(null);
- if (!seed || seed.status !== 'generated') {
- return;
- }
- const ctrl = new AbortController();
- axios
- .get(`/aos-seeds/${hash}.bps`, {
- responseType: 'arraybuffer',
- signal: ctrl.signal,
- })
- .then(response => {
- setPatch(response.data);
- })
- .catch(error => {
- setError(error);
- });
- return () => {
- ctrl.abort();
- };
- }, [hash, seed]);
-
- const retry = useCallback(async () => {
- await axios.post(`/api/aos-seed/${hash}/retry`);
- setSeed(seed => ({ ...seed, status: 'pending' }));
- });
-
- if (loading) {
- return <Loading />;
- }
-
- if (error) {
- return <ErrorMessage error={error} />;
- }
-
- if (!seed) {
- return <NotFound />;
- }
-
- return <ErrorBoundary>
- <Helmet>
- {seed ?
- <title>{seed.hash}</title>
- : null}
- </Helmet>
- <Seed onRetry={retry} patch={patch} seed={seed} />
- </ErrorBoundary>;
-};
-
-export default AosSeed;
+++ /dev/null
-import React from 'react';
-import { Container } from 'react-bootstrap';
-import { Helmet } from 'react-helmet';
-
-import Map from '../aos-tracker/Map';
-
-const AosTracker = () => {
- return <Container fluid>
- <Helmet>
- <title>AoS Tracker</title>
- </Helmet>
- <Map />
- </Container>;
-};
-
-export default AosTracker;
+++ /dev/null
-import CRC32 from 'crc-32';
-import localforage from 'localforage';
-import PropTypes from 'prop-types';
-import React from 'react';
-import toastr from 'toastr';
-
-import i18n from '../i18n';
-
-const AosBaseRomContext = React.createContext(null);
-
-const AosBaseRomProvider = ({ children }) => {
- const [rom, setRom] = React.useState(null);
-
- const setRomCallback = React.useCallback(buffer => {
- if (buffer) {
- const crc = CRC32.buf(new Uint8Array(buffer));
- if (crc === 0x35536183) {
- setRom(buffer);
- localforage.setItem('aosBaseRom', buffer);
- toastr.success(i18n.t('aos.baseRomSet'));
- } else {
- toastr.error(i18n.t('aos.baseRomInvalid'));
- }
- } else {
- setRom(null);
- localforage.removeItem('aosBaseRom');
- toastr.success(i18n.t('aos.baseRomRemoved'));
- }
- }, [setRom]);
-
- React.useEffect(async () => {
- const stored = await localforage.getItem('aosBaseRom');
- if (stored) {
- const crc = CRC32.buf(new Uint8Array(stored));
- if (crc == 0x35536183) {
- setRom(stored);
- }
- }
- }, []);
-
- return <AosBaseRomContext.Provider value={{ rom, setRom: setRomCallback }}>
- {children}
- </AosBaseRomContext.Provider>;
-};
-
-AosBaseRomProvider.propTypes = {
- children: PropTypes.node,
-};
-
-export const useAosBaseRom = () => React.useContext(AosBaseRomContext);
-
-export default AosBaseRomProvider;
pending: 'ausstehend',
},
},
- aos: {
- baseRomInvalid: 'CRC32 Check fehlgeschlagen (brauche 35:53:61:83). Falsche ROM Datei?',
- baseRomRemoved: 'Base ROM entfernt.',
- baseRomSet: 'Base ROM gespeichert.',
- inviteBot: 'Bot einladen',
- inviteCommand: 'Bot einladen (nur Commands)',
- randoDiscord: 'Randomizer Discord',
- randoWeb: 'Randomizer Webapp',
- setBaseRom: 'Base ROM auswählen',
- tourneyDiscord: 'Turnier Discord',
- },
- aosGenerate: {
- heading: 'AoSR Seed Generieren',
- },
- aosSeeds: {
- date: '{{ date, L LT }}',
- fetchingPatch: 'Lade Patch',
- filename: 'aosr - {{preset}} - {{hash}}',
- heading: 'Aria of Sorrow Randomizer Seed',
- generated: 'Generiert',
- generator: 'Generator',
- generators: {
- surge: 'Dieser Seed wurde mit dem Randomizer von fusecv auf aosrando.surge.sh generiert',
- },
- mystery: 'Mystery ROM, Einstellungen versteckt',
- noMystery: 'Kein Mystery',
- noRace: 'Kein Race',
- patch: 'ROM patchen',
- patchError: 'Fehler beim Patchen: {{msg}}',
- preset: 'Preset',
- presets: {
- Area: 'Area',
- AreaAllBosses: 'Area alle Bosse',
- AreaBeginner: 'Area Beginner',
- AreaExpert: 'Area Experte',
- AreaExtraFast: 'Area extra schnell',
- AreaRequireAllSouls: 'Area alle Seelen',
- AreaSpicy: 'Area spicy',
- Beginner: 'Beginner',
- custom: 'Custom',
- DoorAllBosses: 'Door alle Bosse',
- DoorAllBossesEasy: 'Door alle Bosses einfach',
- ExtraFastNormal: 'Extra schnell normal',
- Normal: 'Normal',
- SGLive2020: 'SGLive 2020',
- SGLive2021: 'SGLive 2021',
- SpicyNormal: 'Spicy normal',
- Tournament2021: 'Turnier 2021',
- Tournament2022: 'Turnier 2022',
- },
- race: 'Race ROM, Seed versteckt',
- seed: 'Seed',
- settingName: {
- area: 'Karte',
- boss: 'Bosse',
- doublechaos: 'Doppel-Chaos',
- enemy: 'Gegner',
- grahm: 'Graham',
- itempool: 'Item Pool',
- kicker: 'Kicker ohne Malphas',
- levelexp: 'Level EXP',
- logic: 'Logik',
- mapassist: 'Karten-Assistent',
- nodupes: 'Keine dupes',
- noww: 'Kein wrong warp',
- palette: 'Palette',
- panther: 'Panther',
- reqallsouls: 'Alle Seelen benötigt',
- shopprice: 'Shop Preise',
- shopSouls: 'Shop Seelen',
- startshop: 'Start mit Shop',
- telestart: 'Teleport zum Start',
- weight: 'Item Gewichtung',
- },
- settings: 'Settings',
- settingValue: {
- area: {
- AreaRandom: 'Area Randomizer',
- DoorRandom: 'Door Randomizer',
- Vanilla: 'Vanilla',
- },
- boss: {
- 'Dead-endShuffle': 'Dead End Shuffle',
- Vanilla: 'Vanilla',
- },
- doublechaos: {
- 'false': 'Nein',
- 'true': 'Ja',
- },
- enemy: {
- RandomNoLimit: 'Kein Limit',
- RandomP20M5: '+20 -5',
- RandomP30M10: '+30 -10',
- RandomPM10: '±10',
- RandomPM20: '±20',
- RandomPMaxM5: '+Max -5',
- Vanilla: 'Vanilla',
- },
- grahm: {
- AllBosses: 'Alle Bosse',
- BookSouls: 'Bücher-Seelen',
- NoCheck: 'Kein Check',
- },
- itempool: {
- AllSouls: 'Alle Seelen',
- Standard: 'Standard',
- },
- kicker: {
- 'false': 'Nein',
- 'true': 'Ja',
- },
- levelexp: {
- Casual: 'Casual',
- Hard: 'Schwer',
- Lvl1: 'Level 1',
- Vanilla: 'Vanilla',
- },
- logic: {
- AreaTechTiers: 'Area Tech Tiers',
- AreaTechTiersHard: 'Area Tech Tiers schwer',
- ForwardFeed: 'Forward feed',
- ForwardFeedHard: 'Forward feed schwer',
- HybridProgression: 'Hybride Progression',
- VeryRandom: 'Sehr zufällig',
- VeryRandomHard: 'Sehr zufällig und schwer',
- VeryRandomHardOnly: 'Sehr zufällig, nur schwer',
- },
- mapassist: {
- 'false': 'Aus',
- 'true': 'An',
- },
- nodupes: {
- 'false': 'Nein',
- 'true': 'Ja',
- },
- noww: {
- 'false': 'Nein',
- 'true': 'Ja',
- },
- palette: {
- Mode1: 'Mode 1',
- 'Mode1.5': 'Mode 1.5',
- Mode2: 'Mode 2',
- Vanilla: 'Vanilla',
- },
- panther: {
- AlwaysRand: 'Immer zufällig',
- ExtraFairRand: 'Extra Fair zufällig',
- FirstAlways: 'Immer zuerst',
- NeverExists: 'Existiert nicht',
- Rand70Dup: 'Zufällig 70% Dupe',
- },
- reqallsouls: {
- 'false': 'Nein',
- 'true': 'Ja',
- },
- shopprice: {
- RandHV: 'Zufällig HV',
- Vanilla: 'Vanilla',
- },
- shopSouls: {
- '2PerGroup': '2 pro Gruppe',
- Half: 'Hälfte',
- OnlySouls: 'Nur Seelen',
- Vanilla: 'Vanilla',
- },
- startshop: {
- Unlocked: 'Verfügbar',
- Unlocked30k: 'Verfügbar 30k',
- Vanilla: 'Vanilla',
- },
- telestart: {
- 'false': 'Nein',
- 'true': 'Ja',
- },
- weight: {
- '0': '0',
- '1.0': '1,0',
- '1.5': '1,5',
- '2.0': '2,0',
- '2.5': '2,5',
- '3.0': '3,0',
- '3.5': '3,5',
- },
- },
- status: 'Status',
- statuses: {
- error: 'Fehler',
- generated: 'generiert',
- pending: 'ausstehend',
- },
- },
applications: {
accept: 'Annehmen',
acceptError: 'Fehler beim Annehmen',
pending: 'pending',
},
},
- aos: {
- baseRomInvalid: 'CRC32 mismatch (need 35:53:61:83). Wrong ROM file?',
- baseRomRemoved: 'Base ROM removed.',
- baseRomSet: 'Base ROM set.',
- inviteBot: 'Invite Bot',
- inviteCommand: 'Invite Bot (command only)',
- randoDiscord: 'Randomizer Discord',
- randoWeb: 'Randomizer Webapp',
- setBaseRom: 'Set base ROM',
- tourneyDiscord: 'Tournament Discord',
- },
- aosGenerate: {
- heading: 'Generate AoSR Seed',
- },
- aosSeeds: {
- date: '{{ date, L LT }}',
- fetchingPatch: 'Fetching patch',
- filename: 'aosr - {{preset}} - {{hash}}',
- heading: 'Aria of Sorrow Randomizer Seed',
- generated: 'Generated',
- generator: 'Generator',
- generators: {
- surge: 'This seed has been generated with fusecv\'s randomizer on aosrando.surge.sh.',
- },
- mystery: 'Mystery ROM, settings hidden',
- noMystery: 'No mystery',
- noRace: 'No race',
- patch: 'Patch ROM',
- patchError: 'Error applying patch: {{msg}}',
- preset: 'Preset',
- presets: {
- Area: 'Area',
- AreaAllBosses: 'Area all bosses',
- AreaBeginner: 'Area beginner',
- AreaExpert: 'Area expert',
- AreaExtraFast: 'Area extra fast',
- AreaRequireAllSouls: 'Area require all souls',
- AreaSpicy: 'Area spicy',
- Beginner: 'Beginner',
- custom: 'Custom',
- DoorAllBosses: 'Door all bosses',
- DoorAllBossesEasy: 'Door all bosses easy',
- ExtraFastNormal: 'Extra fast normal',
- Normal: 'Normal',
- SGLive2020: 'SGLive 2020',
- SGLive2021: 'SGLive 2021',
- SpicyNormal: 'Spicy normal',
- Tournament2021: 'Tournament 2021',
- Tournament2022: 'Tournament 2022',
- },
- race: 'Race ROM, seed hidden',
- seed: 'Seed',
- settingName: {
- area: 'Map',
- boss: 'Bosses',
- doublechaos: 'Double chaos',
- enemy: 'Enemy',
- grahm: 'Graham',
- itempool: 'Item pool',
- kicker: 'Kicker without Malphas',
- levelexp: 'Level EXP',
- logic: 'Logic',
- mapassist: 'Map assist',
- nodupes: 'No dupes',
- noww: 'No wrong warp',
- palette: 'Palette',
- panther: 'Panther',
- reqallsouls: 'Require all souls',
- shopprice: 'Shop price',
- shopSouls: 'Shop souls',
- startshop: 'Start with shop',
- telestart: 'Teleport to start',
- weight: 'Item weight',
- },
- settings: 'Settings',
- settingValue: {
- area: {
- AreaRandom: 'Area random',
- DoorRandom: 'Door random',
- Vanilla: 'Vanilla',
- },
- boss: {
- 'Dead-endShuffle': 'Dead end shuffle',
- Vanilla: 'Vanilla',
- },
- doublechaos: {
- 'false': 'No',
- 'true': 'Yes',
- },
- enemy: {
- RandomNoLimit: 'No limit',
- RandomP20M5: '+20 -5',
- RandomP30M10: '+30 -10',
- RandomPM10: '±10',
- RandomPM20: '±20',
- RandomPMaxM5: '+max -5',
- Vanilla: 'Vanilla',
- },
- grahm: {
- AllBosses: 'All bosses',
- BookSouls: 'Book souls',
- NoCheck: 'No check',
- },
- itempool: {
- AllSouls: 'All souls',
- Standard: 'Standard',
- },
- kicker: {
- 'false': 'No',
- 'true': 'Yes',
- },
- levelexp: {
- Casual: 'Casual',
- Hard: 'Hard',
- Lvl1: 'Level 1',
- Vanilla: 'Vanilla',
- },
- logic: {
- AreaTechTiers: 'Area tech tiers',
- AreaTechTiersHard: 'Area tech tiers hard',
- ForwardFeed: 'Forward feed',
- ForwardFeedHard: 'Forward feed hard',
- HybridProgression: 'Hybrid progression',
- VeryRandom: 'Very random',
- VeryRandomHard: 'Very random hard',
- VeryRandomHardOnly: 'Very random hard only',
- },
- mapassist: {
- 'false': 'Off',
- 'true': 'On',
- },
- nodupes: {
- 'false': 'No',
- 'true': 'Yes',
- },
- noww: {
- 'false': 'No',
- 'true': 'Yes',
- },
- palette: {
- Mode1: 'Mode 1',
- 'Mode1.5': 'Mode 1.5',
- Mode2: 'Mode 2',
- Vanilla: 'Vanilla',
- },
- panther: {
- AlwaysRand: 'Always random',
- ExtraFairRand: 'Extra fair random',
- FirstAlways: 'Always first',
- NeverExists: 'Never exists',
- Rand70Dup: 'Random 70% dupe',
- },
- reqallsouls: {
- 'false': 'No',
- 'true': 'Yes',
- },
- shopprice: {
- RandHV: 'Random HV',
- Vanilla: 'Vanilla',
- },
- shopSouls: {
- '2PerGroup': '2 per group',
- Half: 'Half',
- OnlySouls: 'Only souls',
- Vanilla: 'Vanilla',
- },
- startshop: {
- Unlocked: 'Unlocked',
- Unlocked30k: 'Unlocked 30k',
- Vanilla: 'Vanilla',
- },
- telestart: {
- 'false': 'Disabled',
- 'true': 'Enabled',
- },
- weight: {
- '0': '0',
- '1.0': '1.0',
- '1.5': '1.5',
- '2.0': '2.0',
- '2.5': '2.5',
- '3.0': '3.0',
- '3.5': '3.5',
- },
- },
- status: 'Status',
- statuses: {
- error: 'error',
- generated: 'generated',
- pending: 'pending',
- },
- },
applications: {
accept: 'Accept',
acceptError: 'Error accepting',
+++ /dev/null
-<!DOCTYPE html>
-<html lang="{{ str_replace('_', '-', app()->getLocale()) }}">
- <head>
- <meta charset="utf-8">
- <meta name="viewport" content="width=device-width, initial-scale=1">
-
- <title>AoS</title>
- <link rel="icon" href="{{ URL::asset('aos-favicon.ico') }}" type="image/x-icon">
-
- <script src="{{ mix('js/manifest.js') }}" defer></script>
- <script src="{{ mix('js/vendor.js') }}" defer></script>
- <script src="{{ mix('js/app.js') }}" defer></script>
-
- <link href="{{ mix('css/app.css') }}" rel="stylesheet">
- </head>
- <body>
- <div id="aos-root" class="title m-b-md">
- </div>
- </body>
-</html>
Route::get('alttp-seed/{hash}', 'App\Http\Controllers\AlttpSeedController@byHash');
Route::post('alttp-seed/{hash}/retry', 'App\Http\Controllers\AlttpSeedController@retry');
-Route::post('aos-generate', 'App\Http\Controllers\AosSeedController@generate');
-Route::get('aos-presets', 'App\Http\Controllers\AosSeedController@presets');
-Route::get('aos-seed/{hash}', 'App\Http\Controllers\AosSeedController@byHash');
-Route::post('aos-seed/{hash}/retry', 'App\Http\Controllers\AosSeedController@retry');
-
Route::post('application/{application}/accept', 'App\Http\Controllers\ApplicationController@accept');
Route::post('application/{application}/reject', 'App\Http\Controllers\ApplicationController@reject');
Route::get('/sitemap.xml', [SitemapXmlController::class, 'index']);
-Route::domain(config('aos.hostname'))->group(function() {
- Route::view('/{path?}', 'aos')->where('path', '.*');
-});
-
Route::view('/{path?}', 'app')->where('path', '.*');
Route::group(['prefix' => config('larascord.prefix'), 'middleware' => ['web']], function() {