diff options
author | ubq323 <ubq323@ubq323.website> | 2023-02-11 15:33:13 +0000 |
---|---|---|
committer | ubq323 <ubq323@ubq323.website> | 2023-02-11 15:33:13 +0000 |
commit | b4c189ab1b6233c7e7e260446e80b789f375b5d6 (patch) | |
tree | a051262e11172ccd65015fc89f4b92adf0de2ae7 /server/map.lua | |
parent | 81ee73e37348eaae6b1e4a23378d13d129133904 (diff) |
change from random worldgen to be based on a hash of position; implement serverside chunk unloading
Diffstat (limited to 'server/map.lua')
-rw-r--r-- | server/map.lua | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/server/map.lua b/server/map.lua index 9627de9..3d7f377 100644 --- a/server/map.lua +++ b/server/map.lua @@ -29,15 +29,12 @@ function MapS.obtain(self,cp) end function MapS.save_chunk(self,cp) + -- will only actually save anything if anything needs saving. -- any attempt to save not-loaded chunks is silently ignored local ch = self:chunk(cp) if not ch then return end ch:save_if_dirty() end -function MapS.save_and_unload(self,cp) - self:save_chunk(cp) - self:remove_chunk(cp) -end return {MapS=MapS} |