f5d318f02e
- EllieEntity with GeckoLib animations, sleep AI, pathfinding with crouching - Dialog system with conditions and effects - Relationship system with milestones - OpenDoor and bed occupation pathfinding - 15 animations: idle1/2/3, sleep, walkingsimple, shiftwalking/shiftidle, etc.
47 lines
1.6 KiB
Java
47 lines
1.6 KiB
Java
package me.sashegdev.fabled_hearts.dialog;
|
|
|
|
import me.sashegdev.fabled_hearts.api.dialog.IDialogCondition;
|
|
import me.sashegdev.fabled_hearts.api.dialog.IDialogEffect;
|
|
|
|
import java.util.List;
|
|
|
|
public class DialogNode {
|
|
private final String id;
|
|
private final String text;
|
|
private final String animation;
|
|
private final List<DialogChoice> choices;
|
|
|
|
public DialogNode(String id, String text, String animation, List<DialogChoice> choices) {
|
|
this.id = id;
|
|
this.text = text;
|
|
this.animation = animation;
|
|
this.choices = choices;
|
|
}
|
|
|
|
public String getId() { return id; }
|
|
public String getText() { return text; }
|
|
public String getAnimation() { return animation; }
|
|
public List<DialogChoice> getChoices() { return choices; }
|
|
|
|
public static class DialogChoice {
|
|
private final String text;
|
|
private final String nextNodeId;
|
|
private final List<IDialogCondition> conditions;
|
|
private final List<IDialogEffect> effects;
|
|
|
|
public DialogChoice(String text, String nextNodeId,
|
|
List<IDialogCondition> conditions,
|
|
List<IDialogEffect> effects) {
|
|
this.text = text;
|
|
this.nextNodeId = nextNodeId;
|
|
this.conditions = conditions;
|
|
this.effects = effects;
|
|
}
|
|
|
|
public String getText() { return text; }
|
|
public String getNextNodeId() { return nextNodeId; }
|
|
public List<IDialogCondition> getConditions() { return conditions; }
|
|
public List<IDialogEffect> getEffects() { return effects; }
|
|
}
|
|
}
|