去除无用传参

This commit is contained in:
星外之神 2022-05-08 20:02:40 +08:00
parent a6d10a0972
commit d30eeb725e
2 changed files with 2 additions and 3 deletions

View File

@ -1310,7 +1310,7 @@ class TangleKlep(Plant):
# 坑形态的毁灭菇同地刺一样不可以被啃食
# 爆炸时杀死同一格的所有植物
class DoomShroom(Plant):
def __init__(self, x, y, plant_group, mapContent):
def __init__(self, x, y, mapContent):
Plant.__init__(self, x, y, c.DOOMSHROOM, c.PLANT_HEALTH, None)
self.can_sleep = True
self.mapContent = mapContent
@ -1322,7 +1322,6 @@ class DoomShroom(Plant):
self.explode_y_range = 2
self.explode_x_range = c.GRID_X_SIZE * 2.5
self.start_boom = False
self.plant_group = plant_group
self.originalX = x
self.originalY = y

View File

@ -793,7 +793,7 @@ class Level(tool.State):
elif self.plant_name == c.TANGLEKLEP:
new_plant = plant.TangleKlep(x, y)
elif self.plant_name == c.DOOMSHROOM:
new_plant = plant.DoomShroom(x, y, self.plant_groups[map_y], self.map.map[map_y][map_x])
new_plant = plant.DoomShroom(x, y, self.map.map[map_y][map_x])
if new_plant.can_sleep and self.background_type in {c.BACKGROUND_DAY, c.BACKGROUND_POOL, c.BACKGROUND_ROOF, c.BACKGROUND_WALLNUTBOWLING, c.BACKGROUND_SINGLE, c.BACKGROUND_TRIPLE}: