Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Food processor can be used to remove carpotoxin and acidic blood with master domestic skill #5577

Merged
merged 12 commits into from
Feb 21, 2024
33 changes: 32 additions & 1 deletion code/game/machinery/kitchen/processor.dm
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,44 @@

/datum/food_processor_process/process(loc, what)
if (src.output && loc)
new src.output(loc)
var/obj/item/reagent_container/food/snacks/created_food = new src.output(loc)
var/obj/item/reagent_container/food/snacks/original_food = what
if(original_food.made_from_player)
created_food.made_from_player = original_food.made_from_player
created_food.name = (created_food.made_from_player + created_food.name)
if (what)
qdel(what)

/datum/food_processor_process/proc/can_use(mob/user)
// By default, anyone can do it.
return TRUE

/* objs */

/datum/food_processor_process/xenomeat
input = /obj/item/reagent_container/food/snacks/meat/xenomeat
output = /obj/item/reagent_container/food/snacks/meat/xenomeat/processed

/datum/food_processor_process/xenomeat/can_use(mob/user)
if(!skillcheck(user, SKILL_DOMESTIC, SKILL_DOMESTIC_MASTER))
to_chat(user, SPAN_DANGER("You aren't trained to remove dangerous substances from food!"))
return FALSE
return TRUE

/datum/food_processor_process/meat
input = /obj/item/reagent_container/food/snacks/meat
output = /obj/item/reagent_container/food/snacks/rawmeatball

/datum/food_processor_process/carpmeat
input = /obj/item/reagent_container/food/snacks/carpmeat
output = /obj/item/reagent_container/food/snacks/carpmeat/processed

/datum/food_processor_process/carpmeat/can_use(mob/user)
if(!skillcheck(user, SKILL_DOMESTIC, SKILL_DOMESTIC_MASTER))
to_chat(user, SPAN_DANGER("You aren't trained to remove dangerous substances from food!"))
return FALSE
return TRUE

/datum/food_processor_process/potato
input = /obj/item/reagent_container/food/snacks/grown/potato
output = /obj/item/reagent_container/food/snacks/rawsticks
Expand Down Expand Up @@ -88,6 +117,8 @@
if (!P)
to_chat(user, SPAN_DANGER("That probably won't blend."))
return 1
if(!P.can_use(user))
return 1
user.visible_message("[user] put [what] into [src].", \
"You put [what] into [src].")
user.drop_held_item()
Expand Down
18 changes: 9 additions & 9 deletions code/game/objects/items/reagent_containers/food/snacks.dm
Original file line number Diff line number Diff line change
Expand Up @@ -641,9 +641,17 @@
/obj/item/reagent_container/food/snacks/carpmeat/Initialize()
. = ..()
reagents.add_reagent("fish", 3)
reagents.add_reagent("carpotoxin", 3)
reagents.add_reagent("carpotoxin", 6)
src.bitesize = 6

/obj/item/reagent_container/food/snacks/carpmeat/processed
name = "processed carp fillet"
desc = "A fillet of spess carp meat. This one has been processed to remove carpotoxin."

/obj/item/reagent_container/food/snacks/carpmeat/processed/Initialize()
. = ..()
reagents.remove_reagent("carpotoxin", 6)

/obj/item/reagent_container/food/snacks/fishfingers
name = "Fish Fingers"
desc = "A finger of fish."
Expand All @@ -653,7 +661,6 @@
/obj/item/reagent_container/food/snacks/fishfingers/Initialize()
. = ..()
reagents.add_reagent("fish", 4)
reagents.add_reagent("carpotoxin", 3)
bitesize = 3

/obj/item/reagent_container/food/snacks/hugemushroomslice
Expand Down Expand Up @@ -802,7 +809,6 @@
. = ..()
reagents.add_reagent("bread", 3)
reagents.add_reagent("fish", 3)
reagents.add_reagent("carpotoxin", 3)
bitesize = 3

/obj/item/reagent_container/food/snacks/tofuburger
Expand Down Expand Up @@ -850,7 +856,6 @@
. = ..()
reagents.add_reagent("bread", 3)
reagents.add_reagent("meatprotein", 3)
reagents.add_reagent("xenoblood", 3)
bitesize = 3

/obj/item/reagent_container/food/snacks/clownburger
Expand Down Expand Up @@ -1070,7 +1075,6 @@
. = ..()
reagents.add_reagent("bread", 4)
reagents.add_reagent("meatprotein", 2)
reagents.add_reagent("xenoblood", 4)
bitesize = 2

/obj/item/reagent_container/food/snacks/wingfangchu
Expand All @@ -1084,7 +1088,6 @@
. = ..()
reagents.add_reagent("soysauce", 4)
reagents.add_reagent("meatprotein", 4)
reagents.add_reagent("xenoblood", 4)
bitesize = 2

/obj/item/reagent_container/food/snacks/human/kabob
Expand Down Expand Up @@ -1133,7 +1136,6 @@
/obj/item/reagent_container/food/snacks/cubancarp/Initialize()
. = ..()
reagents.add_reagent("fish", 6)
reagents.add_reagent("carpotoxin", 3)
reagents.add_reagent("hotsauce", 3)
bitesize = 3

Expand Down Expand Up @@ -1690,7 +1692,6 @@
/obj/item/reagent_container/food/snacks/fishandchips/Initialize()
. = ..()
reagents.add_reagent("fish", 6)
reagents.add_reagent("carpotoxin", 3)
bitesize = 3

/obj/item/reagent_container/food/snacks/sandwich
Expand Down Expand Up @@ -2172,7 +2173,6 @@
reagents.add_reagent("bread", 10)
reagents.add_reagent("meatprotein", 10)
reagents.add_reagent("cheese", 10)
reagents.add_reagent("xenoblood", 10)
bitesize = 2

/obj/item/reagent_container/food/snacks/xenomeatbreadslice
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,16 @@

/obj/item/reagent_container/food/snacks/meat/xenomeat/Initialize()
. = ..()
reagents.add_reagent("xenoblood", 3)
reagents.add_reagent("xenoblood", 6)
src.bitesize = 6

/obj/item/reagent_container/food/snacks/meat/xenomeat/processed
desc = "A slab of acrid smelling meat. This one has been processed to remove acid."

/obj/item/reagent_container/food/snacks/meat/xenomeat/processed/Initialize()
. = ..()
reagents.remove_reagent("xenoblood", 6)

//fishable atoms meat
// todo: rewrite this into a procgen'ed item when gutting fish? May be incompatible with recipe code if done that way and not hardcoded.
/obj/item/reagent_container/food/snacks/meat/fish
Expand Down
Loading