mirror of
https://github.com/SPLURT-Station/S.P.L.U.R.T-Station-13.git
synced 2025-12-10 01:49:19 +00:00
Python BS + Mapmerge changes
This commit is contained in:
@@ -18,7 +18,7 @@ export NODE_VERSION_PRECISE=12.22.4
|
||||
export SPACEMAN_DMM_VERSION=suite-1.7
|
||||
|
||||
# Python version for mapmerge and other tools
|
||||
export PYTHON_VERSION=3.6.8
|
||||
export PYTHON_VERSION=3.7.9
|
||||
|
||||
# Auxmos git tag
|
||||
export AUXMOS_VERSION=v0.3.0
|
||||
|
||||
@@ -1 +1,2 @@
|
||||
@call powershell.exe -NoLogo -ExecutionPolicy Bypass -File "%~dp0\python_.ps1" %*
|
||||
@echo off
|
||||
call powershell.exe -NoLogo -ExecutionPolicy Bypass -File "%~dp0\python_.ps1" %*
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
python36.zip
|
||||
python37.zip
|
||||
.
|
||||
..\..\..
|
||||
|
||||
@@ -50,7 +50,7 @@ if (!(Test-Path $PythonExe -PathType Leaf)) {
|
||||
[System.IO.Compression.ZipFile]::ExtractToDirectory($Archive, $PythonDir)
|
||||
|
||||
# Copy a ._pth file without "import site" commented, so pip will work
|
||||
Copy-Item "$Bootstrap/python36._pth" $PythonDir `
|
||||
Copy-Item "$Bootstrap/python37._pth" $PythonDir `
|
||||
-ErrorAction Stop
|
||||
|
||||
Remove-Item $Archive
|
||||
|
||||
@@ -4,4 +4,4 @@ from . import frontend, dmm
|
||||
if __name__ == '__main__':
|
||||
settings = frontend.read_settings()
|
||||
for fname in frontend.process(settings, "convert"):
|
||||
dmm.DMM.from_file(fname).to_file(fname, settings.tgm)
|
||||
dmm.DMM.from_file(fname).to_file(fname, tgm = settings.tgm)
|
||||
|
||||
@@ -58,7 +58,7 @@ class DMM:
|
||||
self.grid[coord] = self.get_or_generate_key(tile)
|
||||
|
||||
def generate_new_key(self):
|
||||
free_keys = self._ensure_free_keys(1)
|
||||
self._ensure_free_keys(1)
|
||||
max_key = max_key_for(self.key_length)
|
||||
# choose one of the free keys at random
|
||||
key = random.randint(0, max_key - 1)
|
||||
|
||||
@@ -96,7 +96,7 @@ def main(repo):
|
||||
converted[path] = merge_map(head_files[path], dmm.DMM.from_bytes(data))
|
||||
if len(working_commit.parents) != 1:
|
||||
print("A merge commit was encountered before good versions of these maps were found:")
|
||||
print("\n".join(f" {x}" for x in head_files.keys() - base_files.keys()))
|
||||
print("\n".join(f" {x}" for x in head_files.keys() - converted.keys()))
|
||||
return 1
|
||||
working_commit = working_commit.parents[0]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user