diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..b71b600 --- /dev/null +++ b/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2018 secXsQuared + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. \ No newline at end of file diff --git a/src/README.md b/README.md similarity index 100% rename from src/README.md rename to README.md diff --git a/src/modinfo.lua b/src/modinfo.lua index d957cd4..f0dd7e1 100644 --- a/src/modinfo.lua +++ b/src/modinfo.lua @@ -1,5 +1,5 @@ name = "World Regrowth++" -version = "0.1.2" +version = "0.1.3" description = "Version "..version.."\n\nAdvanced world regrowth including caves! See the Steam Workshop page for more information.\n\nHappy hunting and do starve!" author = "lolo" diff --git a/src/scripts/components/event_regrowth.lua b/src/scripts/components/event_regrowth.lua index 0020057..24e238b 100644 --- a/src/scripts/components/event_regrowth.lua +++ b/src/scripts/components/event_regrowth.lua @@ -20,12 +20,12 @@ return Class(function(self, inst) local UPDATE_PERIOD = 9 local BASE_RADIUS = 20 - local EXCLUDE_RADIUS = 3 + local EXCLUDE_RADIUS = 2 local JITTER_RADIUS = 6 local TOTAL_RADIUS = 1000 local MIN_PLAYER_DISTANCE = 40 local THREADS_PER_BATCH = 3 - local THREADS_PER_BATCH_HOOK = 2 + local THREADS_PER_BATCH_HOOK = 5 local REGROW_STATUS = { SUCCESS = 0, FAILED = 1, @@ -80,6 +80,10 @@ return Class(function(self, inst) return REGROW_STATUS.CACHE end + if not (inst.Map:CanPlantAtPoint(x, y, z)) then + return REGROW_STATUS.CACHE + end + if inst.Map:GetTileAtPoint(x, y, z) ~= tile then -- keep things in their biome (more or less) return REGROW_STATUS.CACHE diff --git a/src/scripts/components/natural_regrowth.lua b/src/scripts/components/natural_regrowth.lua index dbb288a..dcc878e 100644 --- a/src/scripts/components/natural_regrowth.lua +++ b/src/scripts/components/natural_regrowth.lua @@ -19,7 +19,7 @@ return Class(function(self, inst) local DEBUG_TELE = false local UPDATE_PERIOD = 11 local BASE_RADIUS = 20 - local EXCLUDE_RADIUS = 3 + local EXCLUDE_RADIUS = 2 local MIN_PLAYER_DISTANCE = 40 local THREADS_PER_BATCH = 3 --------------------------------------------------------------------------