-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgen_textures.py
63 lines (58 loc) · 1.27 KB
/
gen_textures.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
import sys
import os
import random
# TODO: Parse through palettes
palettes = []
for file in os.listdir("palettes"):
with open("palettes/" + file) as p:
palettes.append(["#" + line.rstrip() for line in p.readlines()])
random_palette = random.choice(palettes)
# probably need to select a random subset of this per tile, otherwise it's kind of noisy
terrain_solid = [
"grass",
"stone",
"clay",
"coal ore",
"brick",
"wooden planks",
"asphalt",
"sand",
"plastic",
"plaster",
"wool",
"leather",
"carbon",
"metal",
"ceramic",
"paper",
"cloth",
"dirt",
"gravel",
"shells",
"pebbles",
"sandstone",
"redrock",
"mud",
"steel",
"cement render",
"quarry tile",
"mosaic",
"terrazzo",
"carpet",
"marble",
"wallpaper",
"paint",
"moss"
]
terrain_top = [
]
os.chdir("pixray")
origin_dir = os.path.abspath(os.curdir)
# --outdir="' + origin_dir + '/grass"
command = 'sudo cog run python pixray.py --drawer=pixel --prompt="flat, top down view, grass texture #pixelart by aamatniekss, Mrmo Tarius, and slym" --size 64 64 --palette=['
for color in random_palette:
command += str(color) + ","
command = command[:-1]
command += "]"
print(command)
os.system(command)