From b4c189ab1b6233c7e7e260446e80b789f375b5d6 Mon Sep 17 00:00:00 2001 From: ubq323 Date: Sat, 11 Feb 2023 15:33:13 +0000 Subject: change from random worldgen to be based on a hash of position; implement serverside chunk unloading --- server/map.lua | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'server/map.lua') 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} -- cgit v1.2.3