diff --git a/src/api/commands/groups/inventory/eat.ts b/src/api/commands/groups/inventory/eat.ts index b6dbe6d..0fc2cea 100644 --- a/src/api/commands/groups/inventory/eat.ts +++ b/src/api/commands/groups/inventory/eat.ts @@ -49,11 +49,14 @@ export const eat = new Command( if (foundObject.objtype == "fish") thingy = "fish"; const bhv = itemBehaviorMap[thingy]; - if (!bhv) return `The ${foundObject.name} isn't edible.`; - if (!bhv["eat"]) return `You can't eat the ${foundObject.name}.`; + if (bhv) { + if (!bhv["eat"]) return `You can't eat the ${foundObject.name}.`; - const res = await runBehavior(thingy, "eat", foundObject, props); - shouldRemove = res.shouldRemove; + const res = await runBehavior(thingy, "eat", foundObject, props); + shouldRemove = res.shouldRemove; + } else { + shouldRemove = true; + } if (shouldRemove) { if (foundObject.objtype == "fish") { diff --git a/src/api/commands/groups/inventory/yeet.ts b/src/api/commands/groups/inventory/yeet.ts index 987ec65..49b9993 100644 --- a/src/api/commands/groups/inventory/yeet.ts +++ b/src/api/commands/groups/inventory/yeet.ts @@ -2,6 +2,7 @@ import { addBack } from "@server/backs"; import Command from "@server/commands/Command"; import { logger } from "@server/commands/handler"; import { getInventory, updateInventory } from "@server/data/inventory"; +import prisma from "@server/data/prisma"; import { getUser } from "@server/data/user"; import { getSizeString } from "@server/fish/fish"; import { fishers, getFishing } from "@server/fish/fishers";