diff --git a/src/Controller/Item/Blueprint/LetterFromTheLibraryOfFireController.php b/src/Controller/Item/Blueprint/LetterFromTheLibraryOfFireController.php index 734c7bf9..4fd6234c 100644 --- a/src/Controller/Item/Blueprint/LetterFromTheLibraryOfFireController.php +++ b/src/Controller/Item/Blueprint/LetterFromTheLibraryOfFireController.php @@ -37,7 +37,7 @@ public function readNote( UserAccessor $userAccessor ): JsonResponse { - ItemControllerHelpers::validateInventory($userAccessor->getUserOrThrow(), $inventory, 'letterFromTheLibraryOfFire/#/read'); + ItemControllerHelpers::validateInventoryAllowingLibrary($userAccessor->getUserOrThrow(), $inventory, 'letterFromTheLibraryOfFire/#/read'); $user = $userAccessor->getUserOrThrow(); @@ -51,11 +51,11 @@ public function readNote( An anonymous benefactor has sponsored your registration as a member of the Library of Fire! -Though you may not heard of The Library of Fire, you\'re no doubt familiar with the myth of the burning of the Library of Alexandria. +Though you may not have heard of The Library of Fire, you\'re no doubt familiar with the myth of the burning of the Library of Alexandria. -The Library of Fire was founded by Aristarchus in 138 BC, shortly after his death, to preserve the spirit of the Library of Alexandria. Named for the enduring flame of knowledge, whispers of the Library of Fire made their way to the material world, where its name become entangled with the story of the decline of the Library of Alexandria. +The Library of Fire was founded by Aristarchus in 138 BC, shortly after his death, to preserve the spirit of the Library of Alexandria. Named for the enduring flame of knowledge, whispers of the Library of Fire made their way to the material world, where its name became entangled with the story of the decline of the Library of Alexandria. -Today, the Library of Fire is home to over 120 trillion works, in the form of books, journals, songs, videos, ixettes, paintings, transmissions, and more! +Today, the Library of Fire is home to more than ℵ0 works, in the form of books, journals, songs, videos, ixettes, paintings, transmissions, and more! Beyond public access to floors 1 through 7, your level of membership entitles you to: * Browsing & borrowing access to floors 8 through 414 of the library @@ -70,6 +70,7 @@ public function readNote( The Library of Fire is always open. We look forward to seeing you!'); } } + #[Route("/{inventory}/meltSeal", methods: ["POST"])] #[IsGranted("IS_AUTHENTICATED_FULLY")] public function meltSeal( diff --git a/src/Controller/Item/Note/BananananersFosterRecipeController.php b/src/Controller/Item/Note/BananananersFosterRecipeController.php index cb0928a8..890586e4 100644 --- a/src/Controller/Item/Note/BananananersFosterRecipeController.php +++ b/src/Controller/Item/Note/BananananersFosterRecipeController.php @@ -34,7 +34,7 @@ public function upload( { $user = $userAccessor->getUserOrThrow(); - ItemControllerHelpers::validateInventory($user, $inventory, 'note/bananananersFoster/#/upload'); + ItemControllerHelpers::validateInventoryAllowingLibrary($user, $inventory, 'note/bananananersFoster/#/upload'); $message = $cookingService->showRecipeNamesToCookingBuddy($user, [ 'Bananananers Foster', @@ -49,7 +49,7 @@ public function readBananananersFosterRecipe(Inventory $inventory, ResponseServi UserAccessor $userAccessor ): JsonResponse { - ItemControllerHelpers::validateInventory($userAccessor->getUserOrThrow(), $inventory, 'note/bananananersFoster/#/read'); + ItemControllerHelpers::validateInventoryAllowingLibrary($userAccessor->getUserOrThrow(), $inventory, 'note/bananananersFoster/#/read'); return $responseService->itemActionSuccess('Start with Naner Ice Cream. diff --git a/src/Controller/Item/Note/BucheDeNoelRecipeController.php b/src/Controller/Item/Note/BucheDeNoelRecipeController.php index 54f8e5d8..79be4c8a 100644 --- a/src/Controller/Item/Note/BucheDeNoelRecipeController.php +++ b/src/Controller/Item/Note/BucheDeNoelRecipeController.php @@ -34,7 +34,7 @@ public function upload( { $user = $userAccessor->getUserOrThrow(); - ItemControllerHelpers::validateInventory($user, $inventory, 'note/bucheDeNoel/#/upload'); + ItemControllerHelpers::validateInventoryAllowingLibrary($user, $inventory, 'note/bucheDeNoel/#/upload'); $message = $cookingService->showRecipeNamesToCookingBuddy($user, [ 'Bûche De Noël', @@ -49,7 +49,7 @@ public function read(Inventory $inventory, ResponseService $responseService, UserAccessor $userAccessor ): JsonResponse { - ItemControllerHelpers::validateInventory($userAccessor->getUserOrThrow(), $inventory, 'note/bucheDeNoel/#/read'); + ItemControllerHelpers::validateInventoryAllowingLibrary($userAccessor->getUserOrThrow(), $inventory, 'note/bucheDeNoel/#/read'); return $responseService->itemActionSuccess('**Bûche De Noël** * Egg diff --git a/src/Controller/Item/Note/CarrotWineRecipeController.php b/src/Controller/Item/Note/CarrotWineRecipeController.php index ac6d368f..2b0df163 100644 --- a/src/Controller/Item/Note/CarrotWineRecipeController.php +++ b/src/Controller/Item/Note/CarrotWineRecipeController.php @@ -34,7 +34,7 @@ public function upload( { $user = $userAccessor->getUserOrThrow(); - ItemControllerHelpers::validateInventory($user, $inventory, 'note/carrotWine/#/upload'); + ItemControllerHelpers::validateInventoryAllowingLibrary($user, $inventory, 'note/carrotWine/#/upload'); $message = $cookingService->showRecipeNamesToCookingBuddy($user, [ 'Carrot Wine (A)', @@ -50,7 +50,7 @@ public function read(Inventory $inventory, ResponseService $responseService, UserAccessor $userAccessor ): JsonResponse { - ItemControllerHelpers::validateInventory($userAccessor->getUserOrThrow(), $inventory, 'note/carrotWine/#/read'); + ItemControllerHelpers::validateInventoryAllowingLibrary($userAccessor->getUserOrThrow(), $inventory, 'note/carrotWine/#/read'); return $responseService->itemActionSuccess('**Carrot Wine** diff --git a/src/Controller/Item/Note/CobblerRecipesController.php b/src/Controller/Item/Note/CobblerRecipesController.php index b5681f73..6e641265 100644 --- a/src/Controller/Item/Note/CobblerRecipesController.php +++ b/src/Controller/Item/Note/CobblerRecipesController.php @@ -34,7 +34,7 @@ public function upload( { $user = $userAccessor->getUserOrThrow(); - ItemControllerHelpers::validateInventory($user, $inventory, 'note/cobblers/#/upload'); + ItemControllerHelpers::validateInventoryAllowingLibrary($user, $inventory, 'note/cobblers/#/upload'); $message = $cookingService->showRecipeNamesToCookingBuddy($user, [ 'Berry Cobbler (Blueberry)', @@ -50,7 +50,7 @@ public function readCobblerRecipes(Inventory $inventory, ResponseService $respon UserAccessor $userAccessor ): JsonResponse { - ItemControllerHelpers::validateInventory($userAccessor->getUserOrThrow(), $inventory, 'note/cobblers/#/read'); + ItemControllerHelpers::validateInventoryAllowingLibrary($userAccessor->getUserOrThrow(), $inventory, 'note/cobblers/#/read'); return $responseService->itemActionSuccess('* flour * milk diff --git a/src/Controller/Item/Note/CreepyMaskDayController.php b/src/Controller/Item/Note/CreepyMaskDayController.php index 6e34e3fb..611c09d2 100644 --- a/src/Controller/Item/Note/CreepyMaskDayController.php +++ b/src/Controller/Item/Note/CreepyMaskDayController.php @@ -31,7 +31,7 @@ public function readCreepyMaskDayNote(Inventory $inventory, ResponseService $res UserAccessor $userAccessor ): JsonResponse { - ItemControllerHelpers::validateInventory($userAccessor->getUserOrThrow(), $inventory, 'note/creepyMaskDay/#/read'); + ItemControllerHelpers::validateInventoryAllowingLibrary($userAccessor->getUserOrThrow(), $inventory, 'note/creepyMaskDay/#/read'); $lines = []; diff --git a/src/Controller/Item/Note/GochujangRecipeController.php b/src/Controller/Item/Note/GochujangRecipeController.php index 2d71dd05..5dac9e9a 100644 --- a/src/Controller/Item/Note/GochujangRecipeController.php +++ b/src/Controller/Item/Note/GochujangRecipeController.php @@ -34,7 +34,7 @@ public function upload( { $user = $userAccessor->getUserOrThrow(); - ItemControllerHelpers::validateInventory($user, $inventory, 'note/gochujang/#/upload'); + ItemControllerHelpers::validateInventoryAllowingLibrary($user, $inventory, 'note/gochujang/#/upload'); $message = $cookingService->showRecipeNamesToCookingBuddy($user, [ 'Gochujang', @@ -49,7 +49,7 @@ public function readGochujangRecipe(Inventory $inventory, ResponseService $respo UserAccessor $userAccessor ): JsonResponse { - ItemControllerHelpers::validateInventory($userAccessor->getUserOrThrow(), $inventory, 'note/gochujang/#/read'); + ItemControllerHelpers::validateInventoryAllowingLibrary($userAccessor->getUserOrThrow(), $inventory, 'note/gochujang/#/read'); return $responseService->itemActionSuccess('Age the following: diff --git a/src/Controller/Item/Note/MissingMailController.php b/src/Controller/Item/Note/MissingMailController.php index f3211388..bb101c1a 100644 --- a/src/Controller/Item/Note/MissingMailController.php +++ b/src/Controller/Item/Note/MissingMailController.php @@ -32,6 +32,7 @@ public function read( IRandom $rng, EntityManagerInterface $em ): JsonResponse { + // CANNOT BE USED FROM LIBRARY: it replaces itself with Paper ItemControllerHelpers::validateInventory($userAccessor->getUserOrThrow(), $inventory, 'missingMail/#/read'); $inventory diff --git a/src/Controller/Item/Note/NoteController.php b/src/Controller/Item/Note/NoteController.php index d2302e8c..477e6aef 100644 --- a/src/Controller/Item/Note/NoteController.php +++ b/src/Controller/Item/Note/NoteController.php @@ -35,6 +35,7 @@ public function eraseNote( { $user = $userAccessor->getUserOrThrow(); + // CANNOT BE USED FROM LIBRARY: it replaces itself with Paper ItemControllerHelpers::validateInventory($user, $inventory, 'note/#/erase'); $paper = ItemRepository::findOneByName($em, 'Paper'); diff --git a/src/Controller/Item/Note/PuddingRecipesController.php b/src/Controller/Item/Note/PuddingRecipesController.php index d6c20736..82542b29 100644 --- a/src/Controller/Item/Note/PuddingRecipesController.php +++ b/src/Controller/Item/Note/PuddingRecipesController.php @@ -34,7 +34,7 @@ public function upload( { $user = $userAccessor->getUserOrThrow(); - ItemControllerHelpers::validateInventory($user, $inventory, 'note/puddin/#/upload'); + ItemControllerHelpers::validateInventoryAllowingLibrary($user, $inventory, 'note/puddin/#/upload'); $message = $cookingService->showRecipeNamesToCookingBuddy($user, [ 'Naner Puddin\'', @@ -51,7 +51,7 @@ public function readPuddingRecipes(Inventory $inventory, ResponseService $respon UserAccessor $userAccessor ): JsonResponse { - ItemControllerHelpers::validateInventory($userAccessor->getUserOrThrow(), $inventory, 'note/puddin/#/read'); + ItemControllerHelpers::validateInventoryAllowingLibrary($userAccessor->getUserOrThrow(), $inventory, 'note/puddin/#/read'); return $responseService->itemActionSuccess('**Naner Puddin\'** diff --git a/src/Controller/Item/Note/SpiritPolymorphPotionRecipeController.php b/src/Controller/Item/Note/SpiritPolymorphPotionRecipeController.php index 24537469..e645f708 100644 --- a/src/Controller/Item/Note/SpiritPolymorphPotionRecipeController.php +++ b/src/Controller/Item/Note/SpiritPolymorphPotionRecipeController.php @@ -34,7 +34,7 @@ public function upload( { $user = $userAccessor->getUserOrThrow(); - ItemControllerHelpers::validateInventory($user, $inventory, 'note/spiritPolymorphPotion/#/upload'); + ItemControllerHelpers::validateInventoryAllowingLibrary($user, $inventory, 'note/spiritPolymorphPotion/#/upload'); $message = $cookingService->showRecipeNamesToCookingBuddy($user, [ 'Spirit Polymorph Potion (A)', @@ -50,7 +50,7 @@ public function readSpiritPolymorphPotion(Inventory $inventory, ResponseService UserAccessor $userAccessor ): JsonResponse { - ItemControllerHelpers::validateInventory($userAccessor->getUserOrThrow(), $inventory, 'note/spiritPolymorphPotion/#/read'); + ItemControllerHelpers::validateInventoryAllowingLibrary($userAccessor->getUserOrThrow(), $inventory, 'note/spiritPolymorphPotion/#/read'); return $responseService->itemActionSuccess('* Striped Microcline * Witch-hazel diff --git a/src/Controller/Item/Note/StroganoffRecipeController.php b/src/Controller/Item/Note/StroganoffRecipeController.php index 5b7f6fea..ab3e0892 100644 --- a/src/Controller/Item/Note/StroganoffRecipeController.php +++ b/src/Controller/Item/Note/StroganoffRecipeController.php @@ -34,7 +34,7 @@ public function upload( { $user = $userAccessor->getUserOrThrow(); - ItemControllerHelpers::validateInventory($user, $inventory, 'note/stroganoff/#/upload'); + ItemControllerHelpers::validateInventoryAllowingLibrary($user, $inventory, 'note/stroganoff/#/upload'); $message = $cookingService->showRecipeNamesToCookingBuddy($user, [ 'Fish Stroganoff (A)', @@ -54,7 +54,7 @@ public function readStroganoffRecipe(Inventory $inventory, ResponseService $resp UserAccessor $userAccessor ): JsonResponse { - ItemControllerHelpers::validateInventory($userAccessor->getUserOrThrow(), $inventory, 'note/stroganoff/#/read'); + ItemControllerHelpers::validateInventoryAllowingLibrary($userAccessor->getUserOrThrow(), $inventory, 'note/stroganoff/#/read'); return $responseService->itemActionSuccess('* mushrooms, onions, oil (or butter) * fish diff --git a/src/Controller/Item/Note/WelcomeNoteController.php b/src/Controller/Item/Note/WelcomeNoteController.php index 972116ac..eaa4ab1a 100644 --- a/src/Controller/Item/Note/WelcomeNoteController.php +++ b/src/Controller/Item/Note/WelcomeNoteController.php @@ -30,7 +30,7 @@ public function readWelcomeNote(Inventory $inventory, ResponseService $responseS UserAccessor $userAccessor ): JsonResponse { - ItemControllerHelpers::validateInventory($userAccessor->getUserOrThrow(), $inventory, 'note/welcome/#/read'); + ItemControllerHelpers::validateInventoryAllowingLibrary($userAccessor->getUserOrThrow(), $inventory, 'note/welcome/#/read'); return $responseService->itemActionSuccess('# Welcome!