修复坚果保龄球闪退bug

This commit is contained in:
星外之神 2022-06-07 14:59:49 +08:00
parent 87d5d4a890
commit d9a49ff1a1
2 changed files with 2 additions and 2 deletions

View File

@ -137,7 +137,7 @@ class Map():
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)

View File

@ -340,7 +340,7 @@ class Level(tool.State):
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: