Fixed initial chunk load buggy
Some checks failed
Build Dusk / build-linux (push) Failing after 2m15s
Build Dusk / build-psp (push) Failing after 1m48s

This commit is contained in:
2025-11-25 08:27:43 -06:00
parent d068f0f2c3
commit fe0529d021

View File

@@ -15,16 +15,17 @@ class Map:
self.parent = parent self.parent = parent
self.data = {} self.data = {}
self.dataOriginal = {} self.dataOriginal = {}
self.position = [0, 0, 0] # x, y, z self.position = [None, None, None] # x, y, z
self.topLeftX = 0 - (MAP_WIDTH // 2) self.topLeftX = None
self.topLeftY = 0 - (MAP_HEIGHT // 2) self.topLeftY = None
self.topLeftZ = 0 - (MAP_DEPTH // 2) self.topLeftZ = None
self.chunks = {} self.chunks = {}
self.onMapData = Event() self.onMapData = Event()
self.onPositionChange = Event() self.onPositionChange = Event()
self.onEntityData = Event() self.onEntityData = Event()
self.mapFileName = None self.mapFileName = None
self.lastFile = None self.lastFile = None
self.firstLoad = True
index = 0 index = 0
for x in range(MAP_WIDTH): for x in range(MAP_WIDTH):
@@ -202,7 +203,9 @@ class Map:
self.position = [x, y, z] self.position = [x, y, z]
self.onPositionChange.invoke(self.position) self.onPositionChange.invoke(self.position)
self.updateEditorConfig() if not self.firstLoad:
self.updateEditorConfig()
self.firstLoad = False
def moveRelative(self, x, y, z): def moveRelative(self, x, y, z):
self.moveTo( self.moveTo(