Fix minor prompting bugs

This commit is contained in:
Jackzie 2022-03-15 20:56:04 -05:00
parent aedbf9d77b
commit ff3ba744fd
No known key found for this signature in database
GPG key ID: 1E834FE36520537A
5 changed files with 14 additions and 13 deletions

View file

@ -292,6 +292,7 @@ public int ChooseTrollFlagHandler(Menu menu, MenuAction action, int param1, int
static TrollFlagPrompt prompt;
// If told to go to next prompt, find the next VALID prompt
// Valid prompt is one where the required flags for it, are active
if(isDone || index == -1) {
int nextIndex = GetNextPrompt(troll, flags, index);
// If there is a prompt available, show it, else fall down
@ -506,7 +507,7 @@ int GetNextPrompt(Troll troll, int flags, int currentPrompt = 0) {
if(currentPrompt + 1 == troll.flagPrompts.Length) return -1;
for(int i = currentPrompt + 1; i < troll.flagPrompts.Length; i++) {
troll.GetFlagPrompt(i, prompt);
if(prompt.requireFlags & flags) {
if(flags & prompt.requireFlags == prompt.requireFlags) {
return i;
}
}