Skip to content

Commit

Permalink
Final tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
SammySemicolon committed Oct 28, 2024
1 parent 4e0ee16 commit 00791ed
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 6 deletions.
4 changes: 2 additions & 2 deletions src/generated/resources/assets/malum/lang/en_us.json
Original file line number Diff line number Diff line change
Expand Up @@ -906,12 +906,12 @@
"malum.gui.book.entry.page.headline.void.weight_of_worlds": "The Weight of Worlds",
"malum.gui.book.entry.page.headline.voodoo_magic": "Voodoo magic",
"malum.gui.book.entry.page.headline.warping_engine": "Warping Engine",
"malum.gui.book.entry.page.text.a_personal_note.1": "Within the book, you find a page written by someone other than the Author you are used to. It sticks out just barely from in between one of the chapters. The entries inside appear to be a show of gratitude of sorts, the names ring a bell.",
"malum.gui.book.entry.page.text.a_personal_note.1": "Within the 'Arcana, a page sticks out just barely. As you examine it, the writing seems different than usual- out of this world. The texts inside appear to be a show of gratitude of sorts. The names ring a bell, but not to you.",
"malum.gui.book.entry.page.text.a_personal_note.commendations.alphalilly.1": "I reached out to them after seeing their work for the Arcana project, the Malum' book background art was made by them per commission. They've done an incredible job with them and I'm very happy to have their work in game :3",
"malum.gui.book.entry.page.text.a_personal_note.commendations.coalition_of_magic.1": "The Coalition of Magic is a Supporter exclusive server organized by me and Joefoxe, without everyone's voices and support of the mod, it'd be difficult to find motivation to work as much as I can now. Thank you!",
"malum.gui.book.entry.page.text.a_personal_note.commendations.kultik.1": "Once again, no idea how we got in touch, but they showed quite an interest in Malum and offered to have one of their tracks added to the mod as a music disc. They're responsible for the Aesthetica and Arcane Elegy Music Discs :3",
"malum.gui.book.entry.page.text.a_personal_note.commendations.pessi_mysterio.1": "I remember going on quite a witch hunt to find them, scouring through the internet and asking a bunch of people. They worked on Sound Design for a few mods and so I reached out to them to commission some for Malum. The Spirit Altar, Crucible and Totems are some of their works for this project.",
"malum.gui.book.entry.page.text.a_personal_note.commendations.translation.1": "There's this fella on github who very routinely pushes translations to the mod for the Chinese language, figured they deserve some thanks. They go by ChuijkYahus, so if you're reading this in Chinese it's thanks to them! If you plan to do a complete translation of Malum, let me know- I hope in the future this page can become a list.",
"malum.gui.book.entry.page.text.a_personal_note.commendations.translation.1": "There's this fella on github who very routinely pushes translations to the mod for the Chinese language, figured they deserve some thanks. They go by ChuijkYahus, so if you're reading this in Chinese it's thanks to them! If you plan to do a complete translation of Malum, let me know- I hope in the future I can replace this page with a list of credits.",
"malum.gui.book.entry.page.text.a_personal_note.commendations.wiresegal.1": "I'm not quite sure how we met, can't remember really. At some point, they offered to help out with Malum- most notably with the Encyclopedia Arcana, but also with a decent few bug fixes and refactors of dated systems. A large majority of the Entries are written by them :3",
"malum.gui.book.entry.page.text.a_personal_note.inspirations.astral_sorcery.1": "I love the mod's visual identity and mechanics, anytime it was in a pack I'd make sure to make the most of it. The Path of Exiles is a huge inspiration for some upcoming stuff I wanna add to Malum.",
"malum.gui.book.entry.page.text.a_personal_note.inspirations.eidolon.1": "Eidolon has such a charming atmosphere, when it released I got a little scared about how similar the mod was to my concept of what I want Malum to be, and it really pushed me to innovate. Additionally, the mod's author and I exchange a myriad of cat pictures, it is a charm.",
Expand Down
14 changes: 13 additions & 1 deletion src/main/java/com/sammy/malum/client/screen/codex/BookEntry.java
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import com.sammy.malum.client.VoidRevelationHandler;
import com.sammy.malum.client.screen.codex.pages.BookPage;
import com.sammy.malum.client.screen.codex.pages.EntryReference;
import com.sammy.malum.registry.common.item.*;
import net.minecraft.client.*;
import net.minecraft.network.chat.Style;
import net.minecraft.stats.*;
Expand All @@ -15,7 +16,7 @@

public class BookEntry {

public static final BooleanSupplier AFTER_SOME_TIME = () -> Minecraft.getInstance().player != null && (Minecraft.getInstance().player.getName().getString().equals("Dev") || Minecraft.getInstance().player.getStats().getValue(Stats.CUSTOM.get(Stats.PLAY_TIME)) > 14400);
public static final BooleanSupplier AFTER_THOROUGH_READING = () -> (Minecraft.getInstance().player != null && Minecraft.getInstance().player.getName().getString().equals("Dev") || timesOpenedBook() > 64);
public static final BooleanSupplier AFTER_UMBRAL_CRYSTAL = () -> VoidRevelationHandler.hasSeenTheRevelation(BLACK_CRYSTAL);

public final String identifier;
Expand Down Expand Up @@ -72,4 +73,15 @@ public static PlacedBookEntryBuilder build(String identifier, int xOffset, int y
public static BookEntryBuilder build(String identifier) {
return new BookEntryBuilder(identifier);
}

public static int timesOpenedBook() {
var player = Minecraft.getInstance().player;
if (player == null) {
return 0;
}
var stats = player.getStats();
final int arcana = stats.getValue(Stats.ITEM_USED.get(ItemRegistry.ENCYCLOPEDIA_ARCANA.get()));
final int esoterica = stats.getValue(Stats.ITEM_USED.get(ItemRegistry.ENCYCLOPEDIA_ESOTERICA.get()));
return arcana + esoterica;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ public BookEntryBuilder setEntryVisibleWhen(BooleanSupplier condition) {
}

public BookEntryBuilder afterSomeTime() {
this.entryVisibleChecker = BookEntry.AFTER_SOME_TIME;
this.entryVisibleChecker = BookEntry.AFTER_THOROUGH_READING;
return this;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ public static void setupEntries(ArcanaProgressionScreen screen) {
.addPage(new HeadlineTextPage("a_personal_note.commendations.pessi_mysterio", "a_personal_note.commendations.pessi_mysterio.1"))
.addPage(new HeadlineTextPage("a_personal_note.commendations.kultik", "a_personal_note.commendations.kultik.1"))
.addPage(new HeadlineTextPage("a_personal_note.commendations.coalition_of_magic", "a_personal_note.commendations.coalition_of_magic.1"))
.addPage(new HeadlineTextPage("a_personal_note.commendations.translation", "a_personal_note.commendations.translation.1"))
))
.addReference(new EntryReference(TOKEN_OF_GRATITUDE.get(),
BookEntry.build("a_personal_note.inspirations")
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package com.sammy.malum.common.item.codex;

import com.sammy.malum.client.screen.codex.screens.*;
import net.minecraft.stats.*;
import net.minecraft.world.*;
import net.minecraft.world.entity.player.*;
import net.minecraft.world.item.*;
Expand All @@ -14,6 +15,7 @@ public EncyclopediaArcanaItem(Properties properties) {

@Override
public InteractionResultHolder<ItemStack> use(Level level, Player player, InteractionHand hand) {
player.awardStat(Stats.ITEM_USED.get(this));
if (level.isClientSide) {
final ItemStack stack = player.getItemInHand(hand);
ArcanaProgressionScreen.openCodexViaItem(false);
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/com/sammy/malum/data/MalumLang.java
Original file line number Diff line number Diff line change
Expand Up @@ -1065,7 +1065,7 @@ protected void addTranslations() {

addSimpleEntryHeader("a_personal_note", "A Personal Note", "A page from another book");
addPages("a_personal_note",
"Within the book, you find a page written by someone other than the Author you are used to. It sticks out just barely from in between one of the chapters. The entries inside appear to be a show of gratitude of sorts, the names ring a bell.");
"Within the 'Arcana, a page sticks out just barely. As you examine it, the writing seems different than usual- out of this world. The texts inside appear to be a show of gratitude of sorts. The names ring a bell, but not to you.");

addSimpleEntryHeader("a_personal_note.commendations", "Malum; Commendations", "A Thank You Letter");
addHeadline("a_personal_note.commendations.wiresegal", "Wiresegal");
Expand All @@ -1085,7 +1085,7 @@ protected void addTranslations() {
"The Coalition of Magic is a Supporter exclusive server organized by me and Joefoxe, without everyone's voices and support of the mod, it'd be difficult to find motivation to work as much as I can now. Thank you!");
addHeadline("a_personal_note.commendations.translation", "Translation");
addPages("a_personal_note.commendations.translation",
"There's this fella on github who very routinely pushes translations to the mod for the Chinese language, figured they deserve some thanks. They go by ChuijkYahus, so if you're reading this in Chinese it's thanks to them! If you plan to do a complete translation of Malum, let me know- I hope in the future this page can become a list.");
"There's this fella on github who very routinely pushes translations to the mod for the Chinese language, figured they deserve some thanks. They go by ChuijkYahus, so if you're reading this in Chinese it's thanks to them! If you plan to do a complete translation of Malum, let me know- I hope in the future I can replace this page with a list of credits.");

addSimpleEntryHeader("a_personal_note.inspirations", "Malum; Inspirations", "What brought me here");
addHeadline("a_personal_note.inspirations.thaumcraft", "Thaumcraft");
Expand Down

0 comments on commit 00791ed

Please sign in to comment.