From f7ec7bd25d8ce700b18e0900ee01db1107f2ccfa Mon Sep 17 00:00:00 2001 From: Daniel Karbach Date: Tue, 1 Aug 2023 17:42:54 +0200 Subject: [PATCH] remove aosr web --- .env.example | 6 - app/Console/Commands/DiscordBotCommand.php | 3 +- app/Console/Commands/GenerateAosSeed.php | 78 --- app/DiscordAppCommands/AosrPresetCommand.php | 559 ------------------ app/Http/Controllers/AosSeedController.php | 72 --- app/Models/AosSeed.php | 81 --- config/aos.php | 9 - config/filesystems.php | 15 +- resources/js/app.js | 5 - .../js/components/aos-generate/Generate.js | 266 --------- resources/js/components/aos-tracker/Arena.js | 124 ---- .../components/aos-tracker/CastleCorridor.js | 232 -------- resources/js/components/aos-tracker/Cell.js | 49 -- resources/js/components/aos-tracker/Chapel.js | 123 ---- .../js/components/aos-tracker/ClockTower.js | 150 ----- .../js/components/aos-tracker/DanceHall.js | 140 ----- .../components/aos-tracker/FloatingGarden.js | 140 ----- .../components/aos-tracker/ForbiddenArea.js | 78 --- .../components/aos-tracker/InnerQuarters.js | 131 ---- resources/js/components/aos-tracker/Map.js | 67 --- resources/js/components/aos-tracker/Region.js | 19 - resources/js/components/aos-tracker/Room.js | 19 - resources/js/components/aos-tracker/Study.js | 114 ---- .../js/components/aos-tracker/TopFloor.js | 142 ----- .../aos-tracker/UndergroundCemetery.js | 74 --- .../aos-tracker/UndergroundReservoir.js | 264 --------- resources/js/components/aos/App.js | 70 --- resources/js/components/aos/BaseRomButton.js | 39 -- resources/js/components/aos/Header.js | 60 -- resources/js/components/aos/Seed.js | 184 ------ resources/js/components/pages/AlttpSeed.js | 4 +- resources/js/components/pages/AosFront.js | 87 --- resources/js/components/pages/AosGenerate.js | 58 -- resources/js/components/pages/AosSeed.js | 108 ---- resources/js/components/pages/AosTracker.js | 16 - resources/js/helpers/AosBaseRomContext.js | 52 -- resources/js/i18n/de.js | 192 ------ resources/js/i18n/en.js | 192 ------ resources/views/aos.blade.php | 20 - routes/api.php | 5 - routes/web.php | 4 - 41 files changed, 4 insertions(+), 4047 deletions(-) delete mode 100644 app/Console/Commands/GenerateAosSeed.php delete mode 100644 app/DiscordAppCommands/AosrPresetCommand.php delete mode 100644 app/Http/Controllers/AosSeedController.php delete mode 100644 app/Models/AosSeed.php delete mode 100644 config/aos.php delete mode 100644 resources/js/components/aos-generate/Generate.js delete mode 100644 resources/js/components/aos-tracker/Arena.js delete mode 100644 resources/js/components/aos-tracker/CastleCorridor.js delete mode 100644 resources/js/components/aos-tracker/Cell.js delete mode 100644 resources/js/components/aos-tracker/Chapel.js delete mode 100644 resources/js/components/aos-tracker/ClockTower.js delete mode 100644 resources/js/components/aos-tracker/DanceHall.js delete mode 100644 resources/js/components/aos-tracker/FloatingGarden.js delete mode 100644 resources/js/components/aos-tracker/ForbiddenArea.js delete mode 100644 resources/js/components/aos-tracker/InnerQuarters.js delete mode 100644 resources/js/components/aos-tracker/Map.js delete mode 100644 resources/js/components/aos-tracker/Region.js delete mode 100644 resources/js/components/aos-tracker/Room.js delete mode 100644 resources/js/components/aos-tracker/Study.js delete mode 100644 resources/js/components/aos-tracker/TopFloor.js delete mode 100644 resources/js/components/aos-tracker/UndergroundCemetery.js delete mode 100644 resources/js/components/aos-tracker/UndergroundReservoir.js delete mode 100644 resources/js/components/aos/App.js delete mode 100644 resources/js/components/aos/BaseRomButton.js delete mode 100644 resources/js/components/aos/Header.js delete mode 100644 resources/js/components/aos/Seed.js delete mode 100644 resources/js/components/pages/AosFront.js delete mode 100644 resources/js/components/pages/AosGenerate.js delete mode 100644 resources/js/components/pages/AosSeed.js delete mode 100644 resources/js/components/pages/AosTracker.js delete mode 100644 resources/js/helpers/AosBaseRomContext.js delete mode 100644 resources/views/aos.blade.php diff --git a/.env.example b/.env.example index ccc63e6..7df3731 100644 --- a/.env.example +++ b/.env.example @@ -64,12 +64,6 @@ DISCORD_BOT_ENABLE_COMMANDS= 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= diff --git a/app/Console/Commands/DiscordBotCommand.php b/app/Console/Commands/DiscordBotCommand.php index 6c9dba9..7c0da50 100644 --- a/app/Console/Commands/DiscordBotCommand.php +++ b/app/Console/Commands/DiscordBotCommand.php @@ -2,7 +2,6 @@ namespace App\Console\Commands; -use App\DiscordAppCommands\AosrPresetCommand; use App\Models\DiscordBotCommand as CommandModel; use App\Models\DiscordChannel; use App\Models\DiscordGuild; @@ -71,7 +70,7 @@ class DiscordBotCommand extends Command //AosrPresetCommand::listen($discord); } if (config('discord.create_commands')) { - AosrPresetCommand::delete($discord); + //AosrPresetCommand::delete($discord); } }); $discord->on(Event::GUILD_CREATE, function (Guild $guild, Discord $discord) { diff --git a/app/Console/Commands/GenerateAosSeed.php b/app/Console/Commands/GenerateAosSeed.php deleted file mode 100644 index fa390c8..0000000 --- a/app/Console/Commands/GenerateAosSeed.php +++ /dev/null @@ -1,78 +0,0 @@ -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; - } -} diff --git a/app/DiscordAppCommands/AosrPresetCommand.php b/app/DiscordAppCommands/AosrPresetCommand.php deleted file mode 100644 index e4d0fbb..0000000 --- a/app/DiscordAppCommands/AosrPresetCommand.php +++ /dev/null @@ -1,559 +0,0 @@ - $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', - ], - ], - ]; - -} diff --git a/app/Http/Controllers/AosSeedController.php b/app/Http/Controllers/AosSeedController.php deleted file mode 100644 index a1718a1..0000000 --- a/app/Http/Controllers/AosSeedController.php +++ /dev/null @@ -1,72 +0,0 @@ -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; - } - -} diff --git a/app/Models/AosSeed.php b/app/Models/AosSeed.php deleted file mode 100644 index f1a3d4a..0000000 --- a/app/Models/AosSeed.php +++ /dev/null @@ -1,81 +0,0 @@ -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', - ]; - -} diff --git a/config/aos.php b/config/aos.php deleted file mode 100644 index 450524d..0000000 --- a/config/aos.php +++ /dev/null @@ -1,9 +0,0 @@ - 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'), -]; diff --git a/config/filesystems.php b/config/filesystems.php index 3847f46..d1e5c6c 100644 --- a/config/filesystems.php +++ b/config/filesystems.php @@ -47,7 +47,7 @@ return [ 'alttp-seeds' => [ 'driver' => 'local', 'root' => storage_path('app/alttp-seeds'), - 'url' => env('AOS_URL').'/alttp-seeds', + 'url' => env('APP_URL').'/alttp-seeds', 'visibility' => 'public', ], @@ -56,18 +56,6 @@ return [ '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'), @@ -103,7 +91,6 @@ return [ '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'), ], diff --git a/resources/js/app.js b/resources/js/app.js index c2de141..f5614c4 100644 --- a/resources/js/app.js +++ b/resources/js/app.js @@ -18,13 +18,8 @@ toastr.options.positionClass = 'toast-bottom-right'; * 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(, document.getElementById('aos-root')); -} - if (document.getElementById('react-root')) { ReactDOM.render(, document.getElementById('react-root')); } diff --git a/resources/js/components/aos-generate/Generate.js b/resources/js/components/aos-generate/Generate.js deleted file mode 100644 index cbdeeb0..0000000 --- a/resources/js/components/aos-generate/Generate.js +++ /dev/null @@ -1,266 +0,0 @@ -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, -}) => - -

{i18n.t('aosGenerate.heading')}

-
- - - - - {i18n.t('aosSeeds.preset')} - - { - 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} - > - - {presets.map(preset => - - )} - - - - - - - {i18n.t('button.generate')} - -
- -
-
- -
- - {settings.map(setting => - - - {i18n.t(`aosSeeds.settingName.${setting}`)} - - { - setFieldValue('preset', 'custom'); - return handleChange(e); - }} - value={values.settings[setting]} - > - {settingValues[setting].map(value => - - )} - - - )} - -
-
; - -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)); diff --git a/resources/js/components/aos-tracker/Arena.js b/resources/js/components/aos-tracker/Arena.js deleted file mode 100644 index 8caa81c..0000000 --- a/resources/js/components/aos-tracker/Arena.js +++ /dev/null @@ -1,124 +0,0 @@ -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 }) => - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ; - -Arena.propTypes = { - x: PropTypes.number, - y: PropTypes.number, -}; - -export default Arena; diff --git a/resources/js/components/aos-tracker/CastleCorridor.js b/resources/js/components/aos-tracker/CastleCorridor.js deleted file mode 100644 index 762225c..0000000 --- a/resources/js/components/aos-tracker/CastleCorridor.js +++ /dev/null @@ -1,232 +0,0 @@ -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 }) => - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ; - -CastleCorridor.propTypes = { - x: PropTypes.number, - y: PropTypes.number, -}; - -export default CastleCorridor; diff --git a/resources/js/components/aos-tracker/Cell.js b/resources/js/components/aos-tracker/Cell.js deleted file mode 100644 index 7c151ef..0000000 --- a/resources/js/components/aos-tracker/Cell.js +++ /dev/null @@ -1,49 +0,0 @@ -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 }) => - - - {hasWall(top) ? - - : null} - {hasWall(right) ? - - : null} - {hasWall(bottom) ? - - : null} - {hasWall(left) ? - - : null} - {hasCorner(top, left) ? - - : null} - {hasCorner(top, right) ? - - : null} - {hasCorner(bottom, left) ? - - : null} - {hasCorner(bottom, right) ? - - : null} - ; - -Cell.propTypes = { - bottom: PropTypes.string, - left: PropTypes.string, - right: PropTypes.string, - top: PropTypes.string, - x: PropTypes.number, - y: PropTypes.number, -}; - -export default Cell; diff --git a/resources/js/components/aos-tracker/Chapel.js b/resources/js/components/aos-tracker/Chapel.js deleted file mode 100644 index 10a6151..0000000 --- a/resources/js/components/aos-tracker/Chapel.js +++ /dev/null @@ -1,123 +0,0 @@ -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 }) => - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ; - -Chapel.propTypes = { - x: PropTypes.number, - y: PropTypes.number, -}; - -export default Chapel; diff --git a/resources/js/components/aos-tracker/ClockTower.js b/resources/js/components/aos-tracker/ClockTower.js deleted file mode 100644 index c53cc2a..0000000 --- a/resources/js/components/aos-tracker/ClockTower.js +++ /dev/null @@ -1,150 +0,0 @@ -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 }) => - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ; - -ClockTower.propTypes = { - x: PropTypes.number, - y: PropTypes.number, -}; - -export default ClockTower; diff --git a/resources/js/components/aos-tracker/DanceHall.js b/resources/js/components/aos-tracker/DanceHall.js deleted file mode 100644 index 676473c..0000000 --- a/resources/js/components/aos-tracker/DanceHall.js +++ /dev/null @@ -1,140 +0,0 @@ -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 }) => - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ; - -DanceHall.propTypes = { - x: PropTypes.number, - y: PropTypes.number, -}; - -export default DanceHall; diff --git a/resources/js/components/aos-tracker/FloatingGarden.js b/resources/js/components/aos-tracker/FloatingGarden.js deleted file mode 100644 index 324d6f7..0000000 --- a/resources/js/components/aos-tracker/FloatingGarden.js +++ /dev/null @@ -1,140 +0,0 @@ -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 }) => - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ; - -FloatingGarden.propTypes = { - x: PropTypes.number, - y: PropTypes.number, -}; - -export default FloatingGarden; diff --git a/resources/js/components/aos-tracker/ForbiddenArea.js b/resources/js/components/aos-tracker/ForbiddenArea.js deleted file mode 100644 index b223b7a..0000000 --- a/resources/js/components/aos-tracker/ForbiddenArea.js +++ /dev/null @@ -1,78 +0,0 @@ -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 }) => - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ; - -ForbiddenArea.propTypes = { - x: PropTypes.number, - y: PropTypes.number, -}; - -export default ForbiddenArea; diff --git a/resources/js/components/aos-tracker/InnerQuarters.js b/resources/js/components/aos-tracker/InnerQuarters.js deleted file mode 100644 index e460660..0000000 --- a/resources/js/components/aos-tracker/InnerQuarters.js +++ /dev/null @@ -1,131 +0,0 @@ -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 }) => - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ; - -InnerQuarters.propTypes = { - x: PropTypes.number, - y: PropTypes.number, -}; - -export default InnerQuarters; diff --git a/resources/js/components/aos-tracker/Map.js b/resources/js/components/aos-tracker/Map.js deleted file mode 100644 index 488ee34..0000000 --- a/resources/js/components/aos-tracker/Map.js +++ /dev/null @@ -1,67 +0,0 @@ -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 = () => - - - - - - - - - - - - - - - - ; - -export default Map; diff --git a/resources/js/components/aos-tracker/Region.js b/resources/js/components/aos-tracker/Region.js deleted file mode 100644 index b122f17..0000000 --- a/resources/js/components/aos-tracker/Region.js +++ /dev/null @@ -1,19 +0,0 @@ -import PropTypes from 'prop-types'; -import React from 'react'; - -const Region = ({ children, name, x, y }) => - - {children} - ; - -Region.propTypes = { - children: PropTypes.node, - name: PropTypes.string, - x: PropTypes.number, - y: PropTypes.number, -}; - -export default Region; diff --git a/resources/js/components/aos-tracker/Room.js b/resources/js/components/aos-tracker/Room.js deleted file mode 100644 index 4642379..0000000 --- a/resources/js/components/aos-tracker/Room.js +++ /dev/null @@ -1,19 +0,0 @@ -import PropTypes from 'prop-types'; -import React from 'react'; - -const Room = ({ children, type, x, y }) => - - {children} - ; - -Room.propTypes = { - children: PropTypes.node, - type: PropTypes.string, - x: PropTypes.number, - y: PropTypes.number, -}; - -export default Room; diff --git a/resources/js/components/aos-tracker/Study.js b/resources/js/components/aos-tracker/Study.js deleted file mode 100644 index 160602a..0000000 --- a/resources/js/components/aos-tracker/Study.js +++ /dev/null @@ -1,114 +0,0 @@ -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 }) => - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ; - -Study.propTypes = { - x: PropTypes.number, - y: PropTypes.number, -}; - -export default Study; diff --git a/resources/js/components/aos-tracker/TopFloor.js b/resources/js/components/aos-tracker/TopFloor.js deleted file mode 100644 index 402a9f1..0000000 --- a/resources/js/components/aos-tracker/TopFloor.js +++ /dev/null @@ -1,142 +0,0 @@ -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 }) => - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ; - -TopFloor.propTypes = { - x: PropTypes.number, - y: PropTypes.number, -}; - -export default TopFloor; diff --git a/resources/js/components/aos-tracker/UndergroundCemetery.js b/resources/js/components/aos-tracker/UndergroundCemetery.js deleted file mode 100644 index d18d3e8..0000000 --- a/resources/js/components/aos-tracker/UndergroundCemetery.js +++ /dev/null @@ -1,74 +0,0 @@ -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 }) => - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ; - -UndergroundCemetery.propTypes = { - x: PropTypes.number, - y: PropTypes.number, -}; - -export default UndergroundCemetery; diff --git a/resources/js/components/aos-tracker/UndergroundReservoir.js b/resources/js/components/aos-tracker/UndergroundReservoir.js deleted file mode 100644 index 9e6434a..0000000 --- a/resources/js/components/aos-tracker/UndergroundReservoir.js +++ /dev/null @@ -1,264 +0,0 @@ -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 }) => - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ; - -UndergroundReservoir.propTypes = { - x: PropTypes.number, - y: PropTypes.number, -}; - -export default UndergroundReservoir; diff --git a/resources/js/components/aos/App.js b/resources/js/components/aos/App.js deleted file mode 100644 index a092074..0000000 --- a/resources/js/components/aos/App.js +++ /dev/null @@ -1,70 +0,0 @@ -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 - - -
- - } /> - } /> - } /> - } /> - } /> - - - - ; -}; - -export default App; diff --git a/resources/js/components/aos/BaseRomButton.js b/resources/js/components/aos/BaseRomButton.js deleted file mode 100644 index fe9d930..0000000 --- a/resources/js/components/aos/BaseRomButton.js +++ /dev/null @@ -1,39 +0,0 @@ -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 - - - ; -}; - -export default withTranslation()(BaseRomButton); diff --git a/resources/js/components/aos/Header.js b/resources/js/components/aos/Header.js deleted file mode 100644 index 314cf69..0000000 --- a/resources/js/components/aos/Header.js +++ /dev/null @@ -1,60 +0,0 @@ -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 }) => - - - - - AoS - - - - - - - - - -; - -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)); diff --git a/resources/js/components/aos/Seed.js b/resources/js/components/aos/Seed.js deleted file mode 100644 index 513bdd3..0000000 --- a/resources/js/components/aos/Seed.js +++ /dev/null @@ -1,184 +0,0 @@ -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 -

{i18n.t('aosSeeds.heading')}

- - - {rom ? - - : - - } - - -

- {i18n.t('aosSeeds.preset')}: - {' '} - {i18n.t(`aosSeeds.presets.${seed.preset}`)} -

- {seed.seed ? -

- {i18n.t('aosSeeds.seed')}: - {' '} - {seed.seed} -

- : null} - {seed.race ? -

{i18n.t('aosSeeds.race')}

- : null} - {seed.mystery ? -

{i18n.t('aosSeeds.mystery')}

- : null} - {seed.status === 'generated' ? -

- {i18n.t('aosSeeds.generated')}: - {' '} - - {i18n.t('aosSeeds.date', { date: new Date(seed.updated_at) })} - -

- : -

- {i18n.t('aosSeeds.status')}: - {' '} - {i18n.t(`aosSeeds.statuses.${seed.status}`)} -

- } - {seed.status === 'error' ? -

- -

- : null} - -
-

{i18n.t('aosSeeds.generator')}

-

{i18n.t(`aosSeeds.generators.${seed.generator}`)}

- {seed.settings ? <> -

{i18n.t('aosSeeds.settings')}

- - {Object.entries(seed.settings).map(([key, value]) => - - - {i18n.t(`aosSeeds.settingName.${key}`)} - -
- {isDefaultSetting(key, value) ? - i18n.t(`aosSeeds.settingValue.${key}.${value}`) - : - {i18n.t(`aosSeeds.settingValue.${key}.${value}`)} - } - - )} -
- : null} -
; -}; - -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); diff --git a/resources/js/components/pages/AlttpSeed.js b/resources/js/components/pages/AlttpSeed.js index 43bc020..005d19a 100644 --- a/resources/js/components/pages/AlttpSeed.js +++ b/resources/js/components/pages/AlttpSeed.js @@ -9,7 +9,7 @@ import ErrorBoundary from '../common/ErrorBoundary'; import ErrorMessage from '../common/ErrorMessage'; import Loading from '../common/Loading'; -const AosSeed = () => { +const AlttpSeed = () => { const params = useParams(); const { hash } = params; @@ -105,4 +105,4 @@ const AosSeed = () => { ; }; -export default AosSeed; +export default AlttpSeed; diff --git a/resources/js/components/pages/AosFront.js b/resources/js/components/pages/AosFront.js deleted file mode 100644 index 9651110..0000000 --- a/resources/js/components/pages/AosFront.js +++ /dev/null @@ -1,87 +0,0 @@ -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 - - AoS - - -
-

Castlevania: Aria of Sorrow

-
- - - - - - - - - - - - - - - - - -
; -}; - -export default AosFront; diff --git a/resources/js/components/pages/AosGenerate.js b/resources/js/components/pages/AosGenerate.js deleted file mode 100644 index b787848..0000000 --- a/resources/js/components/pages/AosGenerate.js +++ /dev/null @@ -1,58 +0,0 @@ -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 ; - } - - if (error) { - return ; - } - - return - - {t('aosGenerate.heading')} - - - ; -}; - -export default AosGenerate; diff --git a/resources/js/components/pages/AosSeed.js b/resources/js/components/pages/AosSeed.js deleted file mode 100644 index ece8406..0000000 --- a/resources/js/components/pages/AosSeed.js +++ /dev/null @@ -1,108 +0,0 @@ -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 ; - } - - if (error) { - return ; - } - - if (!seed) { - return ; - } - - return - - {seed ? - {seed.hash} - : null} - - - ; -}; - -export default AosSeed; diff --git a/resources/js/components/pages/AosTracker.js b/resources/js/components/pages/AosTracker.js deleted file mode 100644 index 5273d0b..0000000 --- a/resources/js/components/pages/AosTracker.js +++ /dev/null @@ -1,16 +0,0 @@ -import React from 'react'; -import { Container } from 'react-bootstrap'; -import { Helmet } from 'react-helmet'; - -import Map from '../aos-tracker/Map'; - -const AosTracker = () => { - return - - AoS Tracker - - - ; -}; - -export default AosTracker; diff --git a/resources/js/helpers/AosBaseRomContext.js b/resources/js/helpers/AosBaseRomContext.js deleted file mode 100644 index f187c73..0000000 --- a/resources/js/helpers/AosBaseRomContext.js +++ /dev/null @@ -1,52 +0,0 @@ -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 - {children} - ; -}; - -AosBaseRomProvider.propTypes = { - children: PropTypes.node, -}; - -export const useAosBaseRom = () => React.useContext(AosBaseRomContext); - -export default AosBaseRomProvider; diff --git a/resources/js/i18n/de.js b/resources/js/i18n/de.js index 8f7cba8..80a432f 100644 --- a/resources/js/i18n/de.js +++ b/resources/js/i18n/de.js @@ -44,198 +44,6 @@ export default { 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', diff --git a/resources/js/i18n/en.js b/resources/js/i18n/en.js index 273682f..ec86f17 100644 --- a/resources/js/i18n/en.js +++ b/resources/js/i18n/en.js @@ -44,198 +44,6 @@ export default { 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', diff --git a/resources/views/aos.blade.php b/resources/views/aos.blade.php deleted file mode 100644 index 84cb0e2..0000000 --- a/resources/views/aos.blade.php +++ /dev/null @@ -1,20 +0,0 @@ - - - - - - - AoS - - - - - - - - - -
-
- - diff --git a/routes/api.php b/routes/api.php index c0db87c..69a8aee 100644 --- a/routes/api.php +++ b/routes/api.php @@ -21,11 +21,6 @@ Route::middleware('auth:sanctum')->get('/user', function (Request $request) { 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'); diff --git a/routes/web.php b/routes/web.php index 375962d..450d21f 100644 --- a/routes/web.php +++ b/routes/web.php @@ -17,10 +17,6 @@ use Illuminate\Support\Facades\Route; 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() { -- 2.39.2