Skip to content

Commit

Permalink
维护清理
Browse files Browse the repository at this point in the history
  • Loading branch information
wszqkzqk committed May 15, 2022
1 parent 9d56c8a commit c87f5b3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion source/component/map.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ def isAvailable(self, map_x, map_y, plantName):
return True
else:
return False
# 被非植物障碍占据的格子对于一般植物不可种植
if any((i in c.NON_PLANT_OBJECTS) for i in self.map[map_y][map_x][c.MAP_PLANT]):
return False
if self.map[map_y][map_x][c.MAP_PLOT_TYPE] == c.MAP_GRASS: # 草地
Expand Down Expand Up @@ -104,7 +105,6 @@ def isAvailable(self, map_x, map_y, plantName):
return False

def getMapIndex(self, x, y):
# 引入新地图后需要增加这里的内容
if self.background_type in c.POOL_EQUIPPED_BACKGROUNDS:
x -= c.MAP_POOL_OFFSET_X
y -= c.MAP_POOL_OFFSET_Y
Expand Down

0 comments on commit c87f5b3

Please sign in to comment.