From b7aafd1ef82c1fcc9d4ca0577600399311576b12 Mon Sep 17 00:00:00 2001 From: Segrain Date: Tue, 24 Oct 2023 02:54:45 +0400 Subject: [PATCH] Fix for slicing food. (#4770) # About the pull request Followup to #4645. And also a fix for ancient math mistake few lines below. # Explain why it's good for the game Is fix. # Changelog :cl: fix: Slicing food once again works as intended. /:cl: --- code/game/objects/items/reagent_containers/food/snacks.dm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/code/game/objects/items/reagent_containers/food/snacks.dm b/code/game/objects/items/reagent_containers/food/snacks.dm index 179e2014f8cf..2892eb1113e7 100644 --- a/code/game/objects/items/reagent_containers/food/snacks.dm +++ b/code/game/objects/items/reagent_containers/food/snacks.dm @@ -184,7 +184,7 @@ var/inaccurate = 0 if(W.sharp == IS_SHARP_ITEM_BIG) inaccurate = 1 - else + else if(W.sharp != IS_SHARP_ITEM_ACCURATE) return 1 if ( !istype(loc, /obj/structure/surface/table) && \ (!isturf(src.loc) || \ @@ -205,7 +205,7 @@ SPAN_NOTICE("[user] crudely slices \the [src] with [W]!"), \ SPAN_NOTICE("You crudely slice \the [src] with your [W]!") \ ) - slices_lost = rand(1,min(1,round(slices_num/2))) + slices_lost = rand(1,max(1,round(slices_num/2))) var/reagents_per_slice = reagents.total_volume/slices_num for(var/i=1 to (slices_num-slices_lost)) var/obj/slice = new slice_path (src.loc)