|
This is just something I did for fun its matrix styled dialogue system (which i simplified just a bit) for 317 (I used elvarg as a base iirc)
https://gist.github.com/ImMelvinn/bb...2da9cfd3840ec7
example usage is in the gist
thanks bud now my nutella npcs can talk
whats with your weird ass javadoc btw
Looks great!
good use of final class
weird use of constants, e.g why have a constant for the dialogue interface id and then numbers without a name like 55 indoes sendEntityDialogue need public access?Code:String wrap = WordUtils.wrap(text[0], 55);
idk why people document enum values when they tend to be self-explanatory and don't show in generated javadoc
good use of empty private constructor also
much cleaner than most garbage on here though so gj
I didnt write that, it was either the original elvarg or matrix. And yeah the enum documentation is a bit pointless but sometimes useful when not self explanatory or poorly named
edit: the wordwrap bit you posted is from original 317
matrix usesCode:StringBuilder builder = new StringBuilder(); builder.append(texts == null ? "" : texts[0] == null ? "" : texts[0]); for (int line = 1; line < texts.length; line++) { builder.append("<br>" + texts[line]); }
pretty hypocrite dont u think
https://www.rune-server.ee/runescape...667-718-a.html
I'd recommend that you make the stage value autoincrement itself in your continue dialogue method. That would be like a 1 line change and you could just change the run method to a boolean that returns false if it needs to terminate. That would save you from continually have to set the next stage id. (for branching/dialogue options you could have a method in the Dialogue class that allows you to set a stage for times when u need to change the start position in your switch statement)
« Previous Thread | Next Thread » |
Thread Information |
Users Browsing this ThreadThere are currently 1 users browsing this thread. (0 members and 1 guests) |