diff --git a/Localization/TranslationsNeeded.txt b/Localization/TranslationsNeeded.txt index 7f99096..eda8448 100644 --- a/Localization/TranslationsNeeded.txt +++ b/Localization/TranslationsNeeded.txt @@ -1,9 +1,9 @@ -en-US, 95/95, 100%, missing 0 -de-DE, 28/95, 29%, missing 67 -it-IT, 28/95, 29%, missing 67 -fr-FR, 28/95, 29%, missing 67 -es-ES, 49/95, 52%, missing 46 -ru-RU, 80/95, 84%, missing 15 -zh-Hans, 95/95, 100%, missing 0 -pt-BR, 95/95, 100%, missing 0 -pl-PL, 80/95, 84%, missing 15 +en-US, 96/96, 100%, missing 0 +de-DE, 28/96, 29%, missing 68 +it-IT, 28/96, 29%, missing 68 +fr-FR, 28/96, 29%, missing 68 +es-ES, 49/96, 51%, missing 47 +ru-RU, 80/96, 83%, missing 16 +zh-Hans, 95/96, 99%, missing 1 +pt-BR, 95/96, 99%, missing 1 +pl-PL, 80/96, 83%, missing 16 diff --git a/Localization/de-DE.hjson b/Localization/de-DE.hjson index d7e9d08..10542cf 100644 --- a/Localization/de-DE.hjson +++ b/Localization/de-DE.hjson @@ -207,5 +207,7 @@ Mods: { } } } + + // Conditions.ShimmerTransmutation: Shimmer Transmutation } } diff --git a/Localization/en-US.hjson b/Localization/en-US.hjson index db78705..d014528 100644 --- a/Localization/en-US.hjson +++ b/Localization/en-US.hjson @@ -211,5 +211,7 @@ Mods: { } } } + + Conditions.ShimmerTransmutation: Shimmer Transmutation } } diff --git a/Localization/es-ES.hjson b/Localization/es-ES.hjson index 3489c0e..192c46f 100644 --- a/Localization/es-ES.hjson +++ b/Localization/es-ES.hjson @@ -207,5 +207,7 @@ Mods: { } } } + + // Conditions.ShimmerTransmutation: Shimmer Transmutation } } diff --git a/Localization/fr-FR.hjson b/Localization/fr-FR.hjson index 529e433..a6e3338 100644 --- a/Localization/fr-FR.hjson +++ b/Localization/fr-FR.hjson @@ -207,5 +207,7 @@ Mods: { } } } + + // Conditions.ShimmerTransmutation: Shimmer Transmutation } } diff --git a/Localization/it-IT.hjson b/Localization/it-IT.hjson index 1f1c0ed..3a398d1 100644 --- a/Localization/it-IT.hjson +++ b/Localization/it-IT.hjson @@ -207,5 +207,7 @@ Mods: { } } } + + // Conditions.ShimmerTransmutation: Shimmer Transmutation } } diff --git a/Localization/pl-PL.hjson b/Localization/pl-PL.hjson index 89d232c..d836e50 100644 --- a/Localization/pl-PL.hjson +++ b/Localization/pl-PL.hjson @@ -207,5 +207,7 @@ Mods: { } } } + + // Conditions.ShimmerTransmutation: Shimmer Transmutation } } diff --git a/Localization/pt-BR.hjson b/Localization/pt-BR.hjson index 772307e..aaa1cce 100644 --- a/Localization/pt-BR.hjson +++ b/Localization/pt-BR.hjson @@ -207,5 +207,7 @@ Mods: { } } } + + // Conditions.ShimmerTransmutation: Shimmer Transmutation } } diff --git a/Localization/ru-RU.hjson b/Localization/ru-RU.hjson index 97fc1ef..fa1b92f 100644 --- a/Localization/ru-RU.hjson +++ b/Localization/ru-RU.hjson @@ -207,5 +207,7 @@ Mods: { } } } + + // Conditions.ShimmerTransmutation: Shimmer Transmutation } } diff --git a/Localization/zh-Hans.hjson b/Localization/zh-Hans.hjson index 6ebe178..522a639 100644 --- a/Localization/zh-Hans.hjson +++ b/Localization/zh-Hans.hjson @@ -211,5 +211,7 @@ Mods: { } } } + + // Conditions.ShimmerTransmutation: Shimmer Transmutation } } diff --git a/RecipeBrowserGlobalItem.cs b/RecipeBrowserGlobalItem.cs index 680c218..a719f40 100644 --- a/RecipeBrowserGlobalItem.cs +++ b/RecipeBrowserGlobalItem.cs @@ -106,7 +106,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", "Recipe added by " + selectedModRecipe.Mod.DisplayName) { diff --git a/UIElements/UIRecipeInfo.cs b/UIElements/UIRecipeInfo.cs index 74cb064..e6ec5fd 100644 --- a/UIElements/UIRecipeInfo.cs +++ b/UIElements/UIRecipeInfo.cs @@ -70,7 +70,7 @@ protected override void DrawSelf(SpriteBatch spriteBatch) int row = 0; int tileIndex = 0; bool comma = false; - if(selectedRecipe.requiredTile.Count == 0) { + if(selectedRecipe.requiredTile.Count == 0 && selectedRecipe.Conditions.Count == 0) { sb.Append($"{(comma ? ", " : "")}[c/{Utilities.textColor.Hex3()}:{Language.GetTextValue("LegacyInterface.23")}]"); sbTiles.Append($"{(comma ? ", " : "")}[c/{Utilities.textColor.Hex3()}:{Language.GetTextValue("LegacyInterface.23")}]"); comma = true; diff --git a/UISystem.cs b/UISystem.cs index 8bf1a1e..ff56021 100644 --- a/UISystem.cs +++ b/UISystem.cs @@ -21,7 +21,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);