diff --git a/Localization/TranslationsNeeded.txt b/Localization/TranslationsNeeded.txt index 226eb80..92198c2 100644 --- a/Localization/TranslationsNeeded.txt +++ b/Localization/TranslationsNeeded.txt @@ -1,9 +1,9 @@ -en-US, 255/255, 100%, missing 0 -de-DE, 28/255, 11%, missing 227 -it-IT, 28/255, 11%, missing 227 -fr-FR, 95/255, 37%, missing 160 -es-ES, 49/255, 19%, missing 206 -ru-RU, 252/255, 99%, missing 3 -zh-Hans, 254/255, 100%, missing 1 -pt-BR, 95/255, 37%, missing 160 -pl-PL, 87/255, 34%, missing 168 +en-US, 256/256, 100%, missing 0 +de-DE, 28/256, 11%, missing 228 +it-IT, 28/256, 11%, missing 228 +fr-FR, 95/256, 37%, missing 161 +es-ES, 49/256, 19%, missing 207 +ru-RU, 252/256, 98%, missing 4 +zh-Hans, 254/256, 99%, missing 2 +pt-BR, 95/256, 37%, missing 161 +pl-PL, 87/256, 34%, missing 169 diff --git a/Localization/de-DE.hjson b/Localization/de-DE.hjson index 41a258d..893273b 100644 --- a/Localization/de-DE.hjson +++ b/Localization/de-DE.hjson @@ -461,5 +461,6 @@ Mods: { } // ItemLostInQuerySlotWarning: "You left an item in the recipe browser with a full inventory and have lost the item: " + // Conditions.ShimmerTransmutation: Shimmer Transmutation } } diff --git a/Localization/en-US.hjson b/Localization/en-US.hjson index fc13d43..5740e4b 100644 --- a/Localization/en-US.hjson +++ b/Localization/en-US.hjson @@ -465,5 +465,6 @@ Mods: { } ItemLostInQuerySlotWarning: "You left an item in the recipe browser with a full inventory and have lost the item: " + Conditions.ShimmerTransmutation: Shimmer Transmutation } } diff --git a/Localization/es-ES.hjson b/Localization/es-ES.hjson index 0f4472b..e4a161c 100644 --- a/Localization/es-ES.hjson +++ b/Localization/es-ES.hjson @@ -461,5 +461,6 @@ Mods: { } // ItemLostInQuerySlotWarning: "You left an item in the recipe browser with a full inventory and have lost the item: " + // Conditions.ShimmerTransmutation: Shimmer Transmutation } } diff --git a/Localization/fr-FR.hjson b/Localization/fr-FR.hjson index d6ad402..f74cb59 100644 --- a/Localization/fr-FR.hjson +++ b/Localization/fr-FR.hjson @@ -478,5 +478,6 @@ Mods: { } // ItemLostInQuerySlotWarning: "You left an item in the recipe browser with a full inventory and have lost the item: " + // Conditions.ShimmerTransmutation: Shimmer Transmutation } } diff --git a/Localization/it-IT.hjson b/Localization/it-IT.hjson index 04f26c9..73c969f 100644 --- a/Localization/it-IT.hjson +++ b/Localization/it-IT.hjson @@ -461,5 +461,6 @@ Mods: { } // ItemLostInQuerySlotWarning: "You left an item in the recipe browser with a full inventory and have lost the item: " + // Conditions.ShimmerTransmutation: Shimmer Transmutation } } diff --git a/Localization/pl-PL.hjson b/Localization/pl-PL.hjson index 52c4fa6..2ffed71 100644 --- a/Localization/pl-PL.hjson +++ b/Localization/pl-PL.hjson @@ -457,5 +457,6 @@ Mods: { } // ItemLostInQuerySlotWarning: "You left an item in the recipe browser with a full inventory and have lost the item: " + // Conditions.ShimmerTransmutation: Shimmer Transmutation } } diff --git a/Localization/pt-BR.hjson b/Localization/pt-BR.hjson index 14992e7..cee350d 100644 --- a/Localization/pt-BR.hjson +++ b/Localization/pt-BR.hjson @@ -457,5 +457,6 @@ Mods: { } // ItemLostInQuerySlotWarning: "You left an item in the recipe browser with a full inventory and have lost the item: " + // Conditions.ShimmerTransmutation: Shimmer Transmutation } } diff --git a/Localization/ru-RU.hjson b/Localization/ru-RU.hjson index efef31b..e3b72a0 100644 --- a/Localization/ru-RU.hjson +++ b/Localization/ru-RU.hjson @@ -474,5 +474,6 @@ Mods: { } ItemLostInQuerySlotWarning: "Вы оставили предмет в браузере рецептов, имея заполненный инвентарь, и потеряли его: " + // Conditions.ShimmerTransmutation: Shimmer Transmutation } } diff --git a/Localization/zh-Hans.hjson b/Localization/zh-Hans.hjson index 6e3b8ed..2d417e3 100644 --- a/Localization/zh-Hans.hjson +++ b/Localization/zh-Hans.hjson @@ -461,5 +461,6 @@ Mods: { } ItemLostInQuerySlotWarning: "因为背包中物品已经满了,所以您留在合成表中的该物品已经丢失: " + // Conditions.ShimmerTransmutation: Shimmer Transmutation } } diff --git a/RecipeBrowserGlobalItem.cs b/RecipeBrowserGlobalItem.cs index 1601817..15e3ba1 100644 --- a/RecipeBrowserGlobalItem.cs +++ b/RecipeBrowserGlobalItem.cs @@ -109,7 +109,7 @@ public override void ModifyTooltips(Item item, List tooltips) { if (RecipeCatalogueUI.instance.hoveredIndex < 0) return; var selectedModRecipe = Main.recipe[RecipeCatalogueUI.instance.hoveredIndex]; - if (selectedModRecipe.Mod != null && ModContent.GetInstance().ShowRecipeModSource && item.type == selectedModRecipe.createItem.type) + if (selectedModRecipe.Mod != null && selectedModRecipe.Mod != Mod && ModContent.GetInstance().ShowRecipeModSource && item.type == selectedModRecipe.createItem.type) { var line = new TooltipLine(Mod, "RecipeBrowser:RecipeOriginHint", Language.GetTextValue("Mods.RecipeBrowser.RecipeBrowserUI.RecipeAddedBy", selectedModRecipe.Mod.DisplayName)) { diff --git a/UISystem.cs b/UISystem.cs index cb7f8d4..34e2860 100644 --- a/UISystem.cs +++ b/UISystem.cs @@ -23,7 +23,75 @@ public class UISystem : ModSystem public override void PreSaveAndQuit() => RecipeBrowser.instance.PreSaveAndQuit(); - public override void PostAddRecipes() + public override void AddRecipes() { + Condition shimmerTransmutationCondition = new("Mods.RecipeBrowser.Conditions.ShimmerTransmutation", () => false); + for (int i = 0; i < ItemID.Sets.ShimmerTransformToItem.Length; i++) { + // For some reason this is set initially but gets overriden later on + // So I'll skip it + if (i == ItemID.LihzahrdBrickWall) + continue; + int shimmerTransmutation = ItemID.Sets.ShimmerTransformToItem[i]; + if (shimmerTransmutation > 0) { + Recipe.Create(shimmerTransmutation) + .AddIngredient(i) + .AddCondition(shimmerTransmutationCondition) + .Register(); + } + } + + // Fix for vanilla hardcoded transmutations + Recipe.Create(ItemID.RodOfHarmony) + .AddIngredient(ItemID.RodofDiscord) + .AddCondition(shimmerTransmutationCondition) + .AddCondition(Condition.DownedMoonLord) + .Register(); + + Recipe.Create(ItemID.Clentaminator2) + .AddIngredient(ItemID.Clentaminator) + .AddCondition(shimmerTransmutationCondition) + .AddCondition(Condition.DownedMoonLord) + .Register(); + + Recipe.Create(ItemID.BottomlessBucket) + .AddIngredient(ItemID.BottomlessShimmerBucket) + .AddCondition(shimmerTransmutationCondition) + .AddCondition(Condition.DownedMoonLord) + .Register(); + + Recipe.Create(ItemID.BottomlessShimmerBucket) + .AddIngredient(ItemID.BottomlessBucket) + .AddCondition(shimmerTransmutationCondition) + .AddCondition(Condition.DownedMoonLord) + .Register(); + + Recipe.Create(ItemID.LihzahrdWallUnsafe) + .AddIngredient(ItemID.LihzahrdBrickWall) + .AddCondition(shimmerTransmutationCondition) + .AddCondition(Condition.DownedGolem) + .Register(); + + List> luminiteBrickTransmutations = new() { + new KeyValuePair(ItemID.HeavenforgeBrick, Condition.MoonPhaseFull), + new KeyValuePair(ItemID.LunarRustBrick, Condition.MoonPhaseWaningGibbous), + new KeyValuePair(ItemID.AstraBrick, Condition.MoonPhaseThirdQuarter), + new KeyValuePair(ItemID.DarkCelestialBrick, Condition.MoonPhaseWaningCrescent), + new KeyValuePair(ItemID.MercuryBrick, Condition.MoonPhaseNew), + new KeyValuePair(ItemID.StarRoyaleBrick, Condition.MoonPhaseWaxingCrescent), + new KeyValuePair(ItemID.CryocoreBrick, Condition.MoonPhaseFirstQuarter), + new KeyValuePair(ItemID.CosmicEmberBrick, Condition.MoonPhaseWaxingGibbous) + }; + + foreach (var item in luminiteBrickTransmutations) + { + Recipe.Create(item.Key) + .AddIngredient(ItemID.LunarBrick) + .AddCondition(shimmerTransmutationCondition) + .AddCondition(item.Value) + .Register(); + } + } + + public override void PostAddRecipes() { if (!Main.dedServ) { LootCacheManager.Setup(RecipeBrowser.instance);