diff --git a/source/component/map.py b/source/component/map.py index f95527e0..83b4cf7a 100755 --- a/source/component/map.py +++ b/source/component/map.py @@ -137,7 +137,7 @@ def getMapGridPos(self, map_x, map_y): map_y * c.GRID_Y_SIZE + c.GRID_Y_SIZE//5 * 3 + c.MAP_OFFSET_Y) def setMapGridType(self, map_x, map_y, plot_type): - self.map[map_y][map_x] = plot_type + self.map[map_y][map_x][c.MAP_PLOT_TYPE] = plot_type def addMapPlant(self, map_x, map_y, plantName, sleep=False): self.map[map_y][map_x][c.MAP_PLANT].add(plantName) diff --git a/source/state/level.py b/source/state/level.py index d4d222d0..93588486 100644 --- a/source/state/level.py +++ b/source/state/level.py @@ -340,7 +340,7 @@ def pvzTime(self, current_time): def initBowlingMap(self): for x in range(3, self.map.width): for y in range(self.map.height): - self.map.setMapGridType(x, y, c.MAP_STATE_UNAVAILABLE) # 将坚果保龄球红线右侧设置为不可种植任何植物 + self.map.setMapGridType(x, y, c.MAP_UNAVAILABLE) # 将坚果保龄球红线右侧设置为不可种植任何植物 def initState(self): if c.CHOOSEBAR_TYPE in self.map_data: