From 9604c196382204c73d3142a3bb069600af075640 Mon Sep 17 00:00:00 2001 From: Oarcinae Date: Fri, 4 Oct 2024 19:01:30 -0400 Subject: [PATCH] More fish. --- lib/oarc_utils.lua | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/lib/oarc_utils.lua b/lib/oarc_utils.lua index 0087f13..c495512 100644 --- a/lib/oarc_utils.lua +++ b/lib/oarc_utils.lua @@ -1357,6 +1357,11 @@ function CreateCropCircle(surface, centerPos, chunkArea, tileRadius, fillTile, m -- land connections if the spawn is on or near land. elseif ((distSqr < moat_radius_sqr) and (distSqr > tile_radius_sqr)) then table.insert(dirtTiles, { name = "water", position = { i, j } }) + + --5% chance of fish in water + if (math.random(1,20) == 1) then + surface.create_entity({name="fish", position={i + 0.5, j + 0.5}}) + end end end end @@ -1410,6 +1415,11 @@ function CreateCropOctagon(surface, centerPos, chunkArea, tileRadius, fillTile, -- land connections if the spawn is on or near land. elseif ((distVar > tileRadius) and (distVar <= moat_width_outer)) then table.insert(dirtTiles, { name = "water", position = { i, j } }) + + --5% chance of fish in water + if (math.random(1,20) == 1) then + surface.create_entity({name="fish", position={i + 0.5, j + 0.5}}) + end end end end @@ -1461,6 +1471,11 @@ function CreateCropSquare(surface, centerPos, chunkArea, tileRadius, fillTile, m -- land connections if the spawn is on or near land. elseif ((max_distance > tileRadius) and (max_distance <= moat_width_outer)) then table.insert(dirtTiles, { name = "water", position = { i, j } }) + + --5% chance of fish in water + if (math.random(1,20) == 1) then + surface.create_entity({name="fish", position={i + 0.5, j + 0.5}}) + end end end end