Skip to content
This repository was archived by the owner on Feb 7, 2025. It is now read-only.

Commit

Permalink
fix: Cooking end block index bug
Browse files Browse the repository at this point in the history
  • Loading branch information
Atralupus committed Mar 31, 2024
1 parent 65fe7e9 commit 07e16e7
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion backend/app/Savor22b/States/KitchenEquipmentState.cs
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,9 @@ public bool IsInUse(long currentBlockIndex)

public long CookingEndBlockIndex()
{
return CookingStartedBlockIndex ?? 0 + CookingDurationBlock ?? 0;
var startedBlockIndex = CookingStartedBlockIndex ?? 0;
var durationBlock = CookingDurationBlock ?? 0;
return startedBlockIndex + durationBlock;
}

public KitchenEquipmentState StartCooking(
Expand Down

0 comments on commit 07e16e7

Please sign in to comment.