Skip to content

Commit

Permalink
feat: enable category buttons for sub-categories
Browse files Browse the repository at this point in the history
  • Loading branch information
klikli-dev committed Jan 23, 2024
1 parent bf49f4b commit b031b33
Show file tree
Hide file tree
Showing 8 changed files with 12 additions and 10 deletions.
1 change: 1 addition & 0 deletions src/generated/resources/assets/occultism/lang/en_us.json
Original file line number Diff line number Diff line change
Expand Up @@ -626,6 +626,7 @@
"book.occultism.dictionary_of_spirits.spirits.name": "Spirits",
"book.occultism.dictionary_of_spirits.spirits.overview.afrit.text": "Even more powerful than Djinni, Afrit are used for the creation of major artifacts and the possession of powerful beings.\n",
"book.occultism.dictionary_of_spirits.spirits.overview.afrit.title": "Afrit",
"book.occultism.dictionary_of_spirits.spirits.overview.description": "An overview of the supernatural",
"book.occultism.dictionary_of_spirits.spirits.overview.djinni.text": "The most commonly summoned class. There is a great variety of Djinni, differing both in intelligence and power. Djinni can be used for a variety of task, ranging from higher artifacts over possession of living beings to carrying out tasks in their Chosen Form.\n",
"book.occultism.dictionary_of_spirits.spirits.overview.djinni.title": "Djinni",
"book.occultism.dictionary_of_spirits.spirits.overview.foliot.text": "The lowest identified class of spirit. Equipped with some intelligence and a modicum of power they are most often used for manual labor or minor artifacts.\n",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@
"width": 16
},
"name": "book.occultism.dictionary_of_spirits.crafting_rituals.name",
"show_category_button": false,
"show_category_button": true,
"sort_number": 7
}
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@
"width": 16
},
"name": "book.occultism.dictionary_of_spirits.familiar_rituals.name",
"show_category_button": false,
"show_category_button": true,
"sort_number": 8
}
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@
"width": 16
},
"name": "book.occultism.dictionary_of_spirits.possession_rituals.name",
"show_category_button": false,
"show_category_button": true,
"sort_number": 6
}
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@
"width": 16
},
"name": "book.occultism.dictionary_of_spirits.spirits.name",
"show_category_button": false,
"show_category_button": true,
"sort_number": 2
}
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@
"width": 16
},
"name": "book.occultism.dictionary_of_spirits.summoning_rituals.name",
"show_category_button": false,
"show_category_button": true,
"sort_number": 5
}
Original file line number Diff line number Diff line change
Expand Up @@ -2073,7 +2073,7 @@ private BookCategoryModel makeSpiritsSubcategory() {

return BookCategoryModel.create(this.modLoc(this.context().categoryId()), this.context().categoryName())
.withIcon(this.modLoc("textures/gui/book/spirits.png"))
.withShowCategoryButton(false)
.withShowCategoryButton(true)
.withEntries(
overview,
returnToGettingStarted,
Expand All @@ -2098,6 +2098,7 @@ private BookEntryModel makeReturnToGettingStartedEntry(CategoryEntryMap entryMap
private BookEntryModel makeSpiritsOverviewEntry(CategoryEntryMap entryMap, char icon) {
this.context().entry("overview");
this.lang().add(this.context().entryName(), "On Spirits");
this.lang().add(this.context().entryDescription(), "An overview of the supernatural");

this.context().page("intro");
var intro = BookTextPageModel.builder()
Expand Down Expand Up @@ -3362,7 +3363,7 @@ private BookCategoryModel makeSummoningRitualsSubcategory() {

return BookCategoryModel.create(this.modLoc(this.context().categoryId()), this.context().categoryName())
.withIcon(this.modLoc("textures/gui/book/summoning.png"))
.withShowCategoryButton(false)
.withShowCategoryButton(true)
.withEntries(
overview,
returnToRituals,
Expand Down Expand Up @@ -4171,7 +4172,7 @@ private BookCategoryModel makeCraftingRitualsSubcategory() {

return BookCategoryModel.create(this.modLoc(this.context().categoryId()), this.context().categoryName())
.withIcon(this.modLoc("textures/gui/book/infusion.png"))
.withShowCategoryButton(false)
.withShowCategoryButton(true)
.withEntries(
overview,
returnToRituals,
Expand Down Expand Up @@ -4787,7 +4788,7 @@ private BookCategoryModel makePossessionRitualsSubcategory() {

return BookCategoryModel.create(this.modLoc(this.context().categoryId()), this.context().categoryName())
.withIcon(this.modLoc("textures/gui/book/possession.png"))
.withShowCategoryButton(false)
.withShowCategoryButton(true)
.withEntries(
overview,
returnToRituals,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ protected BookCategoryModel generateCategory() {

return BookCategoryModel.create(this.modLoc(this.context().categoryId()), this.context().categoryName())
.withIcon(this.modLoc("textures/gui/book/parrot.png"))
.withShowCategoryButton(false);
.withShowCategoryButton(true);
}

private BookEntryModel makeFamiliarsRitualsOverviewEntry(CategoryEntryMap entryMap, char icon) {
Expand Down

0 comments on commit b031b33

Please sign in to comment.