forked from OutlawByteStudios/Persistent-Kingdoms
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdump_skybox_ids.py
More file actions
25 lines (22 loc) · 776 Bytes
/
Copy pathdump_skybox_ids.py
File metadata and controls
25 lines (22 loc) · 776 Bytes
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
import string
from module_info import *
from process_common import *
from module_skyboxes import *
def save_python_header():
file = open("./ID_skyboxes.txt","w")
for i_item in xrange(len(skyboxes)):
file.write("sky_%s = %d\n"%(convert_to_identifier(skyboxes[i_item][0]),i_item))
file.close()
def save_skyboxes():
file = open(export_dir + "/data/skyboxes.txt","w")
file.write("%d\n"%len(skyboxes))
for skybox in skyboxes:
file.write("%s %d %f %f %f %s\n"%(skybox[0],skybox[1],skybox[2],skybox[3],skybox[4],skybox[5]))
file.write(" %f %f %f "%skybox[6])
file.write(" %f %f %f "%skybox[7])
file.write(" %f %f %f "%skybox[8])
file.write(" %f %d\n"%skybox[9])
file.close()
print "Exporting skyboxes..."
save_python_header()
save_skyboxes()