Skip to content

Commit

Permalink
Changed LevelBuilder import behaviour
Browse files Browse the repository at this point in the history
  • Loading branch information
NALStudio committed Nov 7, 2020
1 parent 0e18443 commit 640fc6f
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions LevelBuilder.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
if __name__ != "__main__":
raise ImportError("Level Builder cannot be imported!")
import os
os.chdir(os.path.dirname(os.path.abspath(__file__)))
os.environ['PYGAME_HIDE_SUPPORT_PROMPT'] = ""
Expand Down Expand Up @@ -587,7 +589,5 @@ def button_handler(_openMap: bool = False, _generateLevelProp: bool = False, _qu
grid, brush = tileInfo.renderUpdate(main_display, scroll, grid, brush, updateTiles)
pygame.display.update()
clock.tick(60)
if __name__ == "__main__":
main()
else:
print("Level Builder cannot be imported!")

main()

0 comments on commit 640fc6f

Please sign in to comment.