Skip to content

Commit

Permalink
Linter fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
k-karuna committed Jul 3, 2024
1 parent b809519 commit 45b8de2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cardinal/system/farming.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,9 @@ func FarmingSystem(world cardinal.WorldContext) error {

for i := range playerResources.Resources {
if playerResources.Resources[i].Type == farmingComponent.Type {
tickFarmedAmount := farmingComponent.Speed * float64(constants.TickRate.Seconds()) / float64(time.Minute.Seconds())
tickFarmedAmount := farmingComponent.Speed * constants.TickRate.Seconds() / time.Minute.Seconds()
playerResources.Resources[i].Amount = math.Min(
float64(playerResources.Resources[i].Amount+tickFarmedAmount),
playerResources.Resources[i].Amount+tickFarmedAmount,
float64(totalCapacity),
)
if err := cardinal.SetComponent[comp.PlayerResources](world, playerEntityID, playerResources); err != nil {
Expand Down

0 comments on commit 45b8de2

Please sign in to comment.