Small fixes, massive impact

Signed-off-by: fly <merspieler@airmail.cc>
This commit is contained in:
fly 2020-01-15 17:03:16 +00:00
parent 5926a0f72e
commit 690ce2cef2
2 changed files with 10 additions and 5 deletions

View file

@ -188,7 +188,7 @@ try:
name = ew + norm(abs(j), 3) + ns + norm(abs(i), 2) name = ew + norm(abs(j), 3) + ns + norm(abs(i), 2)
if not name in state or (name in state and state[name]["status"] != "done"): if not name in state or (name in state and state[name]["status"] != "done" and (state[name]["status"] != "skip" or get == "skip")):
if ns == "s": if ns == "s":
ns_step = -1 ns_step = -1
else: else:
@ -204,7 +204,7 @@ try:
iii = abs(i) iii = abs(i)
for l in range(0, 10): for l in range(0, 10):
name_minor = ew + norm(j, 3) + ns + norm(iii, 2) name_minor = ew + norm(j, 3) + ns + norm(iii, 2)
if not name in state or (not name_minor in state[name] or (name_minor in state[name] and (state[name][name_minor]["status"] == get))): if not name in state or (not name_minor in state[name] or (name_minor in state[name] and (state[name][name_minor]["status"] == get or state[name][name_minor]["status"] == "pending"))):
tile = name_minor tile = name_minor
break break
iii += ns_step iii += ns_step

View file

@ -16,7 +16,7 @@
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
import os import os
from subprocess import run, Popen from subprocess import run, Popen, STDOUT
import sys import sys
import socket import socket
import re import re
@ -156,7 +156,7 @@ while running:
else: else:
bounds = "bounds=" bounds = "bounds="
bounds += str(ew_val) + "_" + str(ns_val) + "_" + str(ew_val + 10) + "_" + str(ns_val + 10) bounds += str(ew_val) + "_" + str(ns_val) + "_" + str(ew_val + 1) + "_" + str(ns_val + 1)
if ew_val % 10 != 0: if ew_val % 10 != 0:
ew_val = ew_val - (ew_val % 10) ew_val = ew_val - (ew_val % 10)
@ -169,7 +169,12 @@ while running:
run("echo '" + bounds + "' > projects/worldbuild-" + name + "/settings", shell=True) run("echo '" + bounds + "' > projects/worldbuild-" + name + "/settings", shell=True)
build = Popen("./build -S 10 -t 1 worldbuild-" + name, shell=True, start_new_session=True) print("Building " + name)
with open("projects/worldbuild/output/" + name + ".log", "w") as log_file:
build = Popen("./build -S 10 -t 1 worldbuild-" + name, stdout=log_file, stderr=STDOUT, shell=True, start_new_session=True)
build.wait()
cleanup() cleanup()