Language finished.

This commit is contained in:
2025-11-08 11:12:04 -06:00
parent ab534bb998
commit bc4776f096
9 changed files with 218 additions and 16 deletions

View File

@@ -60,6 +60,8 @@ def processLanguageList():
# Now we can generate the language string chunks.
nextChunkIndex = max(desiredChunkGroups.values()) + 1
files = []
for lang in LANGUAGE_DATA:
langData = LANGUAGE_DATA[lang]
@@ -102,7 +104,6 @@ def processLanguageList():
# We have now chunked all the keys for this language!
langBuffer = b""
files = []
# Write header info
langBuffer += b'DLF' # Dusk Language File
@@ -127,6 +128,12 @@ def processLanguageList():
strData = langData[key].encode('utf-8')
langBuffer += strData
# Now pad the chunk to full size
curLen = chunkInfo['len']
if curLen < LANGUAGE_CHUNK_CHAR_COUNT:
padSize = LANGUAGE_CHUNK_CHAR_COUNT - curLen
langBuffer += b'\0' * padSize
# Write out the language data file
outputFile = os.path.join(args.output_assets, "language", f"{lang}.dlf")
files.append(outputFile)