Skip to content

Commit

Permalink
REVIEW
Browse files Browse the repository at this point in the history
  • Loading branch information
SekoiaTree committed Feb 12, 2024
1 parent b9dea51 commit c94f7f3
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ public void render(DrawContext context, int mouseX, int mouseY, float tickDelta)
int y = mainTextMinY;

for (String illustrationName : this.handler.getCurrentIllustrations()) {
DialogueIllustration illustration = this.handler.getIllustrations().get(illustrationName);
DialogueIllustration illustration = this.handler.getIllustration(illustrationName);
if (illustration != null) {
illustration.render(context, this.textRenderer, 0, 0, mouseX, mouseY, tickDelta);
}
Expand All @@ -241,7 +241,7 @@ public void render(DrawContext context, int mouseX, int mouseY, float tickDelta)
context.drawTextWrapped(this.textRenderer, choice.text(), choiceListMinX, y, choiceListMaxWidth, choiceColor);

for (String illustrationName : choice.illustrations()) {
DialogueIllustration illustration = this.handler.getIllustrations().get(illustrationName);
DialogueIllustration illustration = this.handler.getIllustration(illustrationName);
if (illustration != null) {
illustration.render(context, this.textRenderer, choiceListMinX, y, mouseX, mouseY, tickDelta);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,9 @@ public List<String> getCurrentIllustrations() {
return this.dialogue.getCurrentIllustrations();
}

public Map<String, DialogueIllustration> getIllustrations() {
return this.dialogue.getIllustrations();
@Nullable
public DialogueIllustration getIllustration(String name) {
return this.dialogue.getIllustration(name);
}

public ImmutableList<AvailableChoice> getAvailableChoices() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -117,8 +117,9 @@ public List<String> getCurrentIllustrations() {
return this.getCurrentState().illustrations();
}

public Map<String, DialogueIllustration> getIllustrations() {
return this.template.illustrations();
@Nullable
public DialogueIllustration getIllustration(String name) {
return this.template.illustrations().get(name);
}

public ImmutableList<AvailableChoice> getAvailableChoices() {
Expand Down

0 comments on commit c94f7f3

Please sign in to comment.