1
Fork 0
mirror of https://github.com/Steffo99/flyingsnake.git synced 2024-12-23 06:54:19 +00:00

Update __main__.py

This commit is contained in:
Garvita Jain 2019-09-28 23:56:55 +05:30 committed by GitHub
parent a910c09361
commit 02f7476f46
Signed by: github
GPG key ID: 4AEE18F83AFDEB23

View file

@ -116,7 +116,7 @@ def flyingsnake(input_file: str,
c.echo("Drawing walls...") c.echo("Drawing walls...")
walls = Image.new("RGBA", (world.size.x, world.size.y)) walls = Image.new("RGBA", (world.size.x, world.size.y))
draw = ImageDraw.Draw(walls) draw = ImageDraw.Draw(walls)
with click.progressbar(world.tiles, length = world.size) as bar: with c.progressbar(world.tiles, length = world.size) as bar:
for tile in bar: for tile in bar:
if tile.wall: if tile.wall:
if draw_paint and tile.wall.paint: if draw_paint and tile.wall.paint:
@ -132,7 +132,7 @@ def flyingsnake(input_file: str,
c.echo("Drawing liquids...") c.echo("Drawing liquids...")
liquids = Image.new("RGBA", (world.size.x, world.size.y)) liquids = Image.new("RGBA", (world.size.x, world.size.y))
draw = ImageDraw.Draw(liquids) draw = ImageDraw.Draw(liquids)
with click.progressbar(world.tiles, length = world.size) as bar: with c.progressbar(world.tiles, length = world.size) as bar:
for tile in bar: for tile in bar:
if tile.liquid: if tile.liquid:
if tile.liquid.type == li.tiles.LiquidType.WATER: if tile.liquid.type == li.tiles.LiquidType.WATER:
@ -149,7 +149,7 @@ def flyingsnake(input_file: str,
c.echo("Drawing blocks...") c.echo("Drawing blocks...")
blocks = Image.new("RGBA", (world.size.x, world.size.y)) blocks = Image.new("RGBA", (world.size.x, world.size.y))
draw = ImageDraw.Draw(blocks) draw = ImageDraw.Draw(blocks)
with click.progressbar(world.tiles, length = world.size) as bar: with c.progressbar(world.tiles, length = world.size) as bar:
for tile in bar: for tile in bar:
if tile.block: if tile.block:
if draw_paint and tile.block.paint: if draw_paint and tile.block.paint: