Implemented cooking curry and pita bread

This commit is contained in:
Trident101 2023-09-10 15:41:43 +00:00 committed by Ryan
parent cbeb422411
commit c269949986
No known key found for this signature in database
3 changed files with 34 additions and 7 deletions

View file

@ -19310,6 +19310,14 @@
"archery_ticket_price": "0",
"id": "1866"
},
{
"examine": "It's all burnt.",
"durability": null,
"name": "Burnt pitta bread",
"tradeable": "true",
"archery_ticket_price": "0",
"id": "1867"
},
{
"durability": null,
"name": "Burnt pitta bread",
@ -20724,6 +20732,14 @@
"archery_ticket_price": "0",
"id": "2012"
},
{
"examine": "Eew, it's horribly burnt.",
"durability": null,
"name": "Burnt curry",
"tradeable": "true",
"archery_ticket_price":"0",
"id":"2013"
},
{
"durability": null,
"name": "Burnt curry",

View file

@ -46,7 +46,8 @@ public enum CookableItems {
FAT_SNAIL(3373, 3367, 3375, 22, 95, 73, 402, 73, 402),
// bread
BREAD(2309, 2307, 2311, 1, 40, 0, 0, 118, 492),
BREAD(2309, 2307, 2311, 1, 40, 118, 492, 118, 492),
PITTA_BREAD(1865, 1863, 1867, 58, 40,118, 492, 118, 492),
// cake
CAKE(1891, 1889, 1903, 40, 180, 0, 0, 38, 332),
@ -79,6 +80,7 @@ public enum CookableItems {
// bowl foods
BOWL_STEW(2003, 2001, 2005, 25, 117, 68, 392, 68, 392),
BOWL_CURRY(2011, 2009, 2013, 60, 280, 38, 332, 38, 332),
BOWL_NETTLE(4239, 4237, 4239, 20, 52, 78, 412, 78, 412),
BOWL_EGG(7078, 7076, 7090, 13, 50, 0, 0, 90, 438),
BOWL_ONION(7084, 1871, 7092, 43, 60, 36, 322, 36, 322),

View file

@ -26,7 +26,7 @@ public class StandardCookingPulse extends Pulse {
//Cooking sound
public static final Audio SOUND = new Audio(2577, 1, 1);
private static final int LUMBRIDGE_RANGE = 114;
private final int initial;
@ -96,7 +96,7 @@ public class StandardCookingPulse extends Pulse {
public boolean reward() {
if (getDelay() == 1) {
int delay = object.getName().toLowerCase().contains("range") ? 5 : 4;
if(SkillcapePerks.isActive(SkillcapePerks.HASTY_COOKING, player)) {
if (SkillcapePerks.isActive(SkillcapePerks.HASTY_COOKING, player)) {
delay -= 1;
}
setDelay(delay);
@ -110,7 +110,7 @@ public class StandardCookingPulse extends Pulse {
}
return amount < 1;
}
public boolean isBurned(final Player player, final Scenery object, int food) {
boolean hasGauntlets = player.getEquipment().containsItem(new Item(Items.COOKING_GAUNTLETS_775));
int effectiveCookingLevel = player.getSkills().getLevel(Skills.COOKING);
@ -118,7 +118,8 @@ public class StandardCookingPulse extends Pulse {
effectiveCookingLevel -= 5;
}
CookableItems item = CookableItems.forId(food);
int low, high;
int low;
int high;
if (hasGauntlets && CookableItems.gauntletValues.containsKey(food)) {
int[] successValues = CookableItems.gauntletValues.get(food);
low = successValues[0];
@ -189,11 +190,19 @@ public class StandardCookingPulse extends Pulse {
if (CookableItems.intentionalBurn(food.getId())) {
return "You deliberately burn the perfectly good piece of meat.";
}
if (!burned) {
if (!burned && food.getName().startsWith("Raw")) {
return "You manage to cook some " + food.getName().replace("Raw ", "");
} else {
} else if (burned && food.getName().startsWith("Raw")) {
return "You accidentally burn some " + food.getName().replace("Raw ", "");
}
if (!burned && food.getName().startsWith(("Uncooked"))) {
return "You manage to cook some " + food.getName().replace("Uncooked ", "");
} else if (burned && food.getName().startsWith(("Uncooked"))) {
return "You accidentally burn some " + food.getName().replace("Uncooked ", "");
}
return null;
}
private Animation getAnimation(final Scenery object) {