diff options
| author | Twarug <patryk@twardosz.dev> | 2025-08-12 01:56:23 +0200 |
|---|---|---|
| committer | Linnea Gräf <nea@nea.moe> | 2025-08-24 15:18:01 +0200 |
| commit | f8e0ec50f0f3bbfb8638dfc2ee0edf2da1a94521 (patch) | |
| tree | 5d1422ddd214a071b22a60278f0a5219e9f23360 /src/main | |
| parent | 4f7c55e460b54aee664cbac5e68dcd30abdba714 (diff) | |
| download | Firmament-f8e0ec50f0f3bbfb8638dfc2ee0edf2da1a94521.tar.gz Firmament-f8e0ec50f0f3bbfb8638dfc2ee0edf2da1a94521.tar.bz2 Firmament-f8e0ec50f0f3bbfb8638dfc2ee0edf2da1a94521.zip | |
Remove recipes extraText parsing
Diffstat (limited to 'src/main')
| -rw-r--r-- | src/main/kotlin/repo/recipes/SBCraftingRecipeRenderer.kt | 17 | ||||
| -rw-r--r-- | src/main/kotlin/repo/recipes/SBForgeRecipeRenderer.kt | 15 |
2 files changed, 7 insertions, 25 deletions
diff --git a/src/main/kotlin/repo/recipes/SBCraftingRecipeRenderer.kt b/src/main/kotlin/repo/recipes/SBCraftingRecipeRenderer.kt index 01d9b7c..37994ca 100644 --- a/src/main/kotlin/repo/recipes/SBCraftingRecipeRenderer.kt +++ b/src/main/kotlin/repo/recipes/SBCraftingRecipeRenderer.kt @@ -23,19 +23,10 @@ object SBCraftingRecipeRenderer : GenericRecipeRenderer<NEUCraftingRecipe> { val arrow = layouter.createArrow(point.x + 60, point.y + 18) if (recipe.extraText != null && recipe.extraText!!.isNotBlank()) { - val parts = recipe.extraText!!.split(' ') - - if (parts.size >= 3) { - val requirement = parts.drop(1).joinToString(separator = " ") - - layouter.createTooltip( - arrow, - Text.stringifiedTranslatable( - "firmament.recipe.requirement", - requirement - ) - ) - } + layouter.createTooltip( + arrow, + Text.of(recipe.extraText!!), + ) } for (i in 0 until 3) { diff --git a/src/main/kotlin/repo/recipes/SBForgeRecipeRenderer.kt b/src/main/kotlin/repo/recipes/SBForgeRecipeRenderer.kt index c4fce04..343493a 100644 --- a/src/main/kotlin/repo/recipes/SBForgeRecipeRenderer.kt +++ b/src/main/kotlin/repo/recipes/SBForgeRecipeRenderer.kt @@ -30,18 +30,9 @@ object SBForgeRecipeRenderer : GenericRecipeRenderer<NEUForgeRecipe> { )) if (recipe.extraText != null && recipe.extraText!!.isNotBlank()) { - val parts = recipe.extraText!!.split(' ') - - if (parts.size >= 3) { - val requirement = parts.drop(1).joinToString(separator = " ") - - tooltip - .append(Text.of("\n")) - .append(Text.stringifiedTranslatable( - "firmament.recipe.requirement", - requirement, - )) - } + tooltip + .append(Text.of("\n")) + .append(Text.of(recipe.extraText)) } layouter.createTooltip(arrow, tooltip) |
