From d542c5a4bda1ce13c125ce45fa0c1707866be776 Mon Sep 17 00:00:00 2001 From: Aronai Sieyes Date: Tue, 6 Jul 2021 23:21:09 -0400 Subject: [PATCH 1/3] Lazy attempt at eating micros inside food --- code/modules/food/food/snacks.dm | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/code/modules/food/food/snacks.dm b/code/modules/food/food/snacks.dm index d9757b0c758..9cc0c8e1c2a 100644 --- a/code/modules/food/food/snacks.dm +++ b/code/modules/food/food/snacks.dm @@ -39,12 +39,20 @@ if(nutriment_amt) reagents.add_reagent("nutriment",(nutriment_amt*2),nutriment_desc) //VOREStation Edit: Undoes global nutrition nerf - //Placeholder for effect that trigger on eating that aren't tied to reagents. +//Placeholder for effect that trigger on eating that aren't tied to reagents. /obj/item/weapon/reagent_containers/food/snacks/proc/On_Consume(var/mob/M) if(!usr) usr = M if(!reagents.total_volume) M.visible_message("[M] finishes eating \the [src].","You finish eating \the [src].") + // Embedded-in-food smol vore + for(var/obj/item/weapon/holder/holder in src) + if(holder.held_mob?.devourable && isliving(M)) + var/mob/living/L = M + holder.held_mob.forceMove(L.vore_selected) + holder.held_mob = null + qdel(holder) + usr.drop_from_inventory(src) //so icons update :[ if(trash) From 34a670375854031a35a975f9e534b023903a35ee Mon Sep 17 00:00:00 2001 From: Aronai Sieyes Date: Wed, 7 Jul 2021 11:20:11 -0400 Subject: [PATCH 2/3] Change On_Consume signature --- code/modules/food/food/snacks.dm | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/code/modules/food/food/snacks.dm b/code/modules/food/food/snacks.dm index 9cc0c8e1c2a..d1b2409ac54 100644 --- a/code/modules/food/food/snacks.dm +++ b/code/modules/food/food/snacks.dm @@ -40,20 +40,19 @@ reagents.add_reagent("nutriment",(nutriment_amt*2),nutriment_desc) //VOREStation Edit: Undoes global nutrition nerf //Placeholder for effect that trigger on eating that aren't tied to reagents. -/obj/item/weapon/reagent_containers/food/snacks/proc/On_Consume(var/mob/M) - if(!usr) +/obj/item/weapon/reagent_containers/food/snacks/proc/On_Consume(var/mob/living/M) + if(!usr) // what usr = M if(!reagents.total_volume) M.visible_message("[M] finishes eating \the [src].","You finish eating \the [src].") // Embedded-in-food smol vore for(var/obj/item/weapon/holder/holder in src) - if(holder.held_mob?.devourable && isliving(M)) - var/mob/living/L = M - holder.held_mob.forceMove(L.vore_selected) + if(holder.held_mob?.devourable) + holder.held_mob.forceMove(M.vore_selected) holder.held_mob = null qdel(holder) - usr.drop_from_inventory(src) //so icons update :[ + usr.drop_from_inventory(src) // Drop food from inventory so it doesn't end up staying on the hud after qdel, and so inhands go away if(trash) if(ispath(trash,/obj/item)) @@ -62,7 +61,6 @@ else if(istype(trash,/obj/item)) usr.put_in_hands(trash) qdel(src) - return /obj/item/weapon/reagent_containers/food/snacks/attack_self(mob/user as mob) if(package && !user.incapacitated()) @@ -4266,7 +4264,7 @@ if (!feeder) feeder = eater - feeder.drop_from_inventory(src) //so icons update :[ //what the fuck is this???? + feeder.drop_from_inventory(src) // Drop food from inventory so it doesn't end up staying on the hud after qdel, and so inhands go away if(trash) if(ispath(trash,/obj/item)) From 6c7fd51dbbd72ca23ac85a696fefde307901aec2 Mon Sep 17 00:00:00 2001 From: Aronai Sieyes Date: Wed, 7 Jul 2021 11:30:56 -0400 Subject: [PATCH 3/3] Trash is never used to hold an instance of trash --- code/modules/food/food/snacks.dm | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/code/modules/food/food/snacks.dm b/code/modules/food/food/snacks.dm index d1b2409ac54..e2955b8c0c4 100644 --- a/code/modules/food/food/snacks.dm +++ b/code/modules/food/food/snacks.dm @@ -55,11 +55,8 @@ usr.drop_from_inventory(src) // Drop food from inventory so it doesn't end up staying on the hud after qdel, and so inhands go away if(trash) - if(ispath(trash,/obj/item)) - var/obj/item/TrashItem = new trash(usr) - usr.put_in_hands(TrashItem) - else if(istype(trash,/obj/item)) - usr.put_in_hands(trash) + var/obj/item/TrashItem = new trash(usr) + usr.put_in_hands(TrashItem) qdel(src) /obj/item/weapon/reagent_containers/food/snacks/attack_self(mob/user as mob)