cooking: Fix POH altar burners false positive burn message (#13284)

This commit is contained in:
superiorser9
2021-03-02 06:21:22 +00:00
committed by GitHub
parent 81f37b8c2d
commit d587ff5540
3 changed files with 8 additions and 2 deletions

View File

@@ -196,7 +196,7 @@ public class CookingPlugin extends Plugin
}
else if (message.startsWith("You accidentally burn")
|| message.startsWith("You burn")
|| message.equals("You burn the mushroom in the fire.")
|| message.startsWith("Unfortunately the Jubbly")
|| message.startsWith("You accidentally spoil"))
{

View File

@@ -80,7 +80,7 @@ public class CrowdsourcingCooking
|| message.startsWith("You roast a")
|| message.startsWith("You spit-roast")
|| message.startsWith("You cook")
|| message.startsWith("You burn")
|| message.equals("You burn the mushroom in the fire.")
|| message.startsWith("Eventually the Jubbly")
|| message.startsWith("Unfortunately the Jubbly")
|| message.startsWith("You accidentally burn")

View File

@@ -63,6 +63,8 @@ public class CookingPluginTest
"You dry a piece of meat and extract the sinew."
};
private static final String incenseBurnerMessage = "You burn some marrentill in the incense burner.";
@Inject
CookingPlugin cookingPlugin;
@@ -105,9 +107,13 @@ public class CookingPluginTest
cookingPlugin.onChatMessage(chatMessage);
}
ChatMessage chatMessage = new ChatMessage(null, ChatMessageType.SPAM, "", incenseBurnerMessage, "", 0);
cookingPlugin.onChatMessage(chatMessage);
CookingSession cookingSession = cookingPlugin.getSession();
assertNotNull(cookingSession);
assertEquals(COOKING_MESSAGES.length, cookingSession.getCookAmount());
assertEquals(0, cookingSession.getBurnAmount());
}
@Test