-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcompound_creator.py
49 lines (31 loc) · 1.28 KB
/
compound_creator.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
# Generates compounds in the chemlib format, along with associated recipes for alchemistry.
# Created by coolbot100s for the quick and automatic creation of chemlib & alchemistry addons via KubeJS https://github.com/coolbot100s/ChemistryToolkit
import os
import shutil
import sys
import chemkit
from chemkit import *
# Setup
current_directory = chemkit.current_directory
replace_scripts = chemkit.replace_scripts
reset_data = chemkit.reset_data
answered_file_prompt = False
# Body
if replace_scripts & os.path.exists(output_path):
shutil.rmtree(output_path)
if reset_data:
clean_compounds_data()
while True:
if os.path.exists(current_directory + "\input.json") and answered_file_prompt == False and prompt("an input.json has been found, would you like to use it to create compounds?"):
generate_kjs_from_file()
else:
gen_kubejs_from_user()
# Generate recipes
if prompt("Would you like to generate more compounds?") == False:
sys.exit()
else:
answered_file_prompt = True
# Generate the default recipes (using a generic recipe generator function)
# Generate the JEI plugin data
# Insert the compound into additional dissolver recipes (using a generic recipe editor function(that pulls from github?))
# Generate an output log file