cooking: Fix POH altar burners false positive burn message (#13284)
This commit is contained in:
@@ -196,7 +196,7 @@ public class CookingPlugin extends Plugin
|
|||||||
|
|
||||||
}
|
}
|
||||||
else if (message.startsWith("You accidentally burn")
|
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("Unfortunately the Jubbly")
|
||||||
|| message.startsWith("You accidentally spoil"))
|
|| message.startsWith("You accidentally spoil"))
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -80,7 +80,7 @@ public class CrowdsourcingCooking
|
|||||||
|| message.startsWith("You roast a")
|
|| message.startsWith("You roast a")
|
||||||
|| message.startsWith("You spit-roast")
|
|| message.startsWith("You spit-roast")
|
||||||
|| message.startsWith("You cook")
|
|| message.startsWith("You cook")
|
||||||
|| message.startsWith("You burn")
|
|| message.equals("You burn the mushroom in the fire.")
|
||||||
|| message.startsWith("Eventually the Jubbly")
|
|| message.startsWith("Eventually the Jubbly")
|
||||||
|| message.startsWith("Unfortunately the Jubbly")
|
|| message.startsWith("Unfortunately the Jubbly")
|
||||||
|| message.startsWith("You accidentally burn")
|
|| message.startsWith("You accidentally burn")
|
||||||
|
|||||||
@@ -63,6 +63,8 @@ public class CookingPluginTest
|
|||||||
"You dry a piece of meat and extract the sinew."
|
"You dry a piece of meat and extract the sinew."
|
||||||
};
|
};
|
||||||
|
|
||||||
|
private static final String incenseBurnerMessage = "You burn some marrentill in the incense burner.";
|
||||||
|
|
||||||
@Inject
|
@Inject
|
||||||
CookingPlugin cookingPlugin;
|
CookingPlugin cookingPlugin;
|
||||||
|
|
||||||
@@ -105,9 +107,13 @@ public class CookingPluginTest
|
|||||||
cookingPlugin.onChatMessage(chatMessage);
|
cookingPlugin.onChatMessage(chatMessage);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ChatMessage chatMessage = new ChatMessage(null, ChatMessageType.SPAM, "", incenseBurnerMessage, "", 0);
|
||||||
|
cookingPlugin.onChatMessage(chatMessage);
|
||||||
|
|
||||||
CookingSession cookingSession = cookingPlugin.getSession();
|
CookingSession cookingSession = cookingPlugin.getSession();
|
||||||
assertNotNull(cookingSession);
|
assertNotNull(cookingSession);
|
||||||
assertEquals(COOKING_MESSAGES.length, cookingSession.getCookAmount());
|
assertEquals(COOKING_MESSAGES.length, cookingSession.getCookAmount());
|
||||||
|
assertEquals(0, cookingSession.getBurnAmount());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
|||||||
Reference in New Issue
Block a user