Skip to content

Commit

Permalink
Fix for slicing food. (#4770)
Browse files Browse the repository at this point in the history
# 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:
  • Loading branch information
Segrain committed Oct 23, 2023
1 parent 9961f9b commit b7aafd1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions code/game/objects/items/reagent_containers/food/snacks.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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) || \
Expand All @@ -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)
Expand Down

0 comments on commit b7aafd1

Please sign in to comment.