Skip to content

Commit

Permalink
feat: improve spirit trade documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
klikli-dev committed Jan 1, 2024
1 parent 088acec commit e03f145
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 5 deletions.
3 changes: 2 additions & 1 deletion src/generated/resources/assets/occultism/lang/en_us.json
Original file line number Diff line number Diff line change
Expand Up @@ -700,7 +700,7 @@
"book.occultism.dictionary_of_spirits.summoning_rituals.summon_lumberjack.intro.text": "The lumberjack will harvest trees in it's working area. If a deposit location is set it will collect the dropped items into the specified chest, and re-plant saplings.\n",
"book.occultism.dictionary_of_spirits.summoning_rituals.summon_lumberjack.intro.title": "Foliot Lumberjack",
"book.occultism.dictionary_of_spirits.summoning_rituals.summon_lumberjack.name": "Summon Foliot Lumberjack",
"book.occultism.dictionary_of_spirits.summoning_rituals.summon_lumberjack.prerequisites.text": "Summoning the lumberjack requires a [Stable Otherworld Sapling](item://occultism:otherworld_sapling). You can obtain it by summoning an [Otherworld Sapling Trader][Books of Calling](entry://summoning_rituals/summon_otherworld_sapling_trader).\n",
"book.occultism.dictionary_of_spirits.summoning_rituals.summon_lumberjack.prerequisites.text": "Summoning the lumberjack requires a [Stable Otherworld Sapling](item://occultism:otherworld_sapling). You can obtain it by summoning an [Otherworld Sapling Trader](entry://summoning_rituals/summon_otherworld_sapling_trader).\n",
"book.occultism.dictionary_of_spirits.summoning_rituals.summon_lumberjack.prerequisites.title": "Prerequisites",
"book.occultism.dictionary_of_spirits.summoning_rituals.summon_lumberjack.usage.text": "Use the book of calling to set the work area and deposit location of the lumberjack.\n\\\n\\\nSee [Books of Calling](entry://getting_started/books_of_calling) for more information.\n",
"book.occultism.dictionary_of_spirits.summoning_rituals.summon_lumberjack.usage.title": "Usage",
Expand All @@ -718,6 +718,7 @@
"book.occultism.dictionary_of_spirits.summoning_rituals.summon_otherworld_sapling_trader.intro.text": "Otherworld Trees grown from natural Otherworld Saplings can only be harvested when under the effect of [#](ad03fc)Third Eye[#](). To make life easier, the Otherworld Sapling Trader will exchange such natural saplings for a stable variant that can be harvested by anyone, and will drop the same stable saplings when harvested.\n",
"book.occultism.dictionary_of_spirits.summoning_rituals.summon_otherworld_sapling_trader.intro.title": "Otherworld Sapling Trader",
"book.occultism.dictionary_of_spirits.summoning_rituals.summon_otherworld_sapling_trader.name": "Summon Otherworld Sapling Trader",
"book.occultism.dictionary_of_spirits.summoning_rituals.summon_otherworld_sapling_trader.trade.text": "To trade, drop an your offered item next to the trader, he will pick it up and drop the exchanged item.\n",
"book.occultism.dictionary_of_spirits.summoning_rituals.summon_transport_items.book_of_calling.text": "If you lose the book of calling, you can craft a new one.\n[#](ad03fc)Shift-right-click[#]() the spirit with the crafted book to assign it.\n",
"book.occultism.dictionary_of_spirits.summoning_rituals.summon_transport_items.intro.text": "The transporter is useful in that you don't need a train of hoppers transporting stuff, and can use any inventory to take from and deposit.\n\\\n\\\nTo make it take from an inventory simply sneak and interact with it's book of calling on the inventory you want.\n",
"book.occultism.dictionary_of_spirits.summoning_rituals.summon_transport_items.intro.title": "Foliot Transporter",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"type": "occultism:spirit_trade_recipe",
"anchor": "",
"recipe_id_1": "occultism:spirit_trade/otherworld_sapling",
"text": "",
"text": "book.occultism.dictionary_of_spirits.summoning_rituals.summon_otherworld_sapling_trader.trade.text",
"title1": "",
"title2": ""
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3516,7 +3516,7 @@ private BookEntryModel makeSummonLumberjackEntry(CategoryEntryMap entryMap, char
this.lang.add(this.context().pageTitle(), "Prerequisites");
this.lang.add(this.context().pageText(),
"""
Summoning the lumberjack requires a [Stable Otherworld Sapling](item://occultism:otherworld_sapling). You can obtain it by summoning an [Otherworld Sapling Trader][Books of Calling](entry://summoning_rituals/summon_otherworld_sapling_trader).
Summoning the lumberjack requires a [Stable Otherworld Sapling](item://occultism:otherworld_sapling). You can obtain it by summoning an [Otherworld Sapling Trader](entry://summoning_rituals/summon_otherworld_sapling_trader).
"""
);

Expand Down Expand Up @@ -3835,7 +3835,11 @@ private BookEntryModel makeSummonOtherworldSaplingTraderEntry(CategoryEntryMap e
this.context().page("trade");
var trade = BookSpiritTradeRecipePageModel.builder()
.withRecipeId1(this.modLoc("spirit_trade/otherworld_sapling"))
.withText(this.context().pageText())
.build();
this.lang().add(this.context.pageText(), """
To trade, drop an your offered item next to the trader, he will pick it up and drop the exchanged item.
""");

this.context().page("ritual");
var ritual = BookRitualRecipePageModel.builder()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,11 @@ protected void drawRecipe(GuiGraphics guiGraphics, T recipe, int recipeX, int re

RenderSystem.enableBlend();
guiGraphics.blit(this.page.getBook().getCraftingTexture(), recipeX, recipeY, 11, 71, 24, 24, 128, 256); //first box
guiGraphics.blit(this.page.getBook().getCraftingTexture(), recipeX + 22, recipeY + 7, 0, 246, 18, 10, 128, 256); //"throw arrow"
guiGraphics.blit(this.page.getBook().getCraftingTexture(), recipeX + 36, recipeY + 7, 0, 246, 18, 10, 128, 256); //"throw arrow"
guiGraphics.blit(this.page.getBook().getCraftingTexture(), recipeX + 61, recipeY, 72, 71, 36, 24, 128, 256); //straight arrow and second box

this.parentScreen.renderIngredient(guiGraphics, recipeX + 4, recipeY + 4, mouseX, mouseY, recipe.getIngredients().get(0));
this.parentScreen.renderItemStack(guiGraphics, recipeX + 40, recipeY + 4, mouseX, mouseY, recipe.getToastSymbol());
// this.parentScreen.renderItemStack(guiGraphics, recipeX + 40, recipeY + 4, mouseX, mouseY, recipe.getToastSymbol());
this.parentScreen.renderItemStack(guiGraphics, recipeX + 76, recipeY + 4, mouseX, mouseY, recipe.getResultItem(this.parentScreen.getMinecraft().level.registryAccess()));
}
}

0 comments on commit e03f145

Please sign in to comment.