A team game with an emphasis on movement (with no shooting), inspired by Overwatch and Zineth
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

22 lines
673 B

  1. #!/usr/bin/python3
  2. from pathlib import Path
  3. # Current working directory
  4. cwd = Path.cwd()
  5. for path in cwd.glob('**/*.tscn'):
  6. result = []
  7. with path.open() as f:
  8. for line in f.readlines():
  9. if line.startswith('_sections_unfolded'):
  10. # Skip lines that start with _sections_unfolded
  11. continue
  12. elif line.startswith('[node') and 'parent=' not in line:
  13. # Root node, remove 'index="0"'
  14. result.append(line.replace(' index="0"', ''))
  15. else:
  16. # Add line as is
  17. result.append(line)
  18. with path.open('w') as f:
  19. f.writelines(result)