Don't remove route tracks in scenery processor script
This commit is contained in:
parent
3ae1827d10
commit
7d36835b28
@ -7,22 +7,24 @@ import sys
|
|||||||
# v1.4
|
# v1.4
|
||||||
#
|
#
|
||||||
|
|
||||||
BAD_WORDS = ['Empty,Empty', 'Forest Start,Forest Start', 'EndMiscGroup', 'Fence', 'TerrainPoint', 'Wires']
|
BAD_WORDS = ['EndMiscGroup', 'Fence', 'TerrainPoint', 'Wires']
|
||||||
|
|
||||||
def should_exclude(line: str) -> bool:
|
def should_exclude(line: str) -> bool:
|
||||||
for word in BAD_WORDS:
|
for word in BAD_WORDS:
|
||||||
if line.startswith(word):
|
if line.startswith(word):
|
||||||
return True
|
return True
|
||||||
|
|
||||||
if line.startswith("Misc"):
|
if line.startswith("Misc"):
|
||||||
values = line.split(';')
|
values = line.split(';')
|
||||||
return not values[2].startswith("SignalBox")
|
return not values[2].startswith("SignalBox")
|
||||||
|
|
||||||
|
return False
|
||||||
|
|
||||||
def process_file(file_path: str):
|
def process_file(file_path: str):
|
||||||
if not file_path.endswith(".sc"):
|
if not file_path.endswith(".sc"):
|
||||||
print(f"Skipping non-.sc file: {file_path}")
|
print(f"Skipping non-.sc file: {file_path}")
|
||||||
return
|
return
|
||||||
|
|
||||||
if file_path.endswith(".lite.sc"):
|
if file_path.endswith(".lite.sc"):
|
||||||
print(f"Skipping already processed file: {file_path}")
|
print(f"Skipping already processed file: {file_path}")
|
||||||
return
|
return
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user