mirror of
https://github.com/Noratrieb/game-wip-dontplay.git
synced 2026-01-16 20:35:02 +01:00
py script
This commit is contained in:
parent
2be0e28305
commit
851d491846
4 changed files with 31 additions and 6 deletions
19
apply.py
Executable file
19
apply.py
Executable file
|
|
@ -0,0 +1,19 @@
|
|||
#!/usr/bin/python3
|
||||
|
||||
with open("src/tiles.rs") as f:
|
||||
content: str = f.read()
|
||||
|
||||
result = ''
|
||||
|
||||
while True:
|
||||
next_add = content.find("//ADD")
|
||||
if next_add == -1:
|
||||
break
|
||||
|
||||
result += content[:next_add]
|
||||
content = content[(next_add + 5):]
|
||||
|
||||
result += content
|
||||
|
||||
with open("src/tiles.rs", "w") as f:
|
||||
f.write(result)
|
||||
Loading…
Add table
Add a link
Reference in a new issue