Skip to content

Commit

Permalink
Removed Aspect Ratios and UI mods.
Browse files Browse the repository at this point in the history
  • Loading branch information
MaxLastBreath committed Jun 6, 2024
1 parent 854764a commit df9872e
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 56 deletions.
11 changes: 0 additions & 11 deletions scripts/settings/UltraCam_Template.json
Original file line number Diff line number Diff line change
Expand Up @@ -200,17 +200,6 @@
"Description": "UltraCam Beyond NEW SHADOW resolution setting let's you set shadows up to 8K\nWARNING: REQUIRES EXTENDED MEMORY LAYOUT FOR SHADOWS OVER 1536.",
"Config_Class": [ "Resolution", "ShadowResolution" ]
},
"aspect ratio": {
"Name": "Aspect Ratio",
"Class": "dropdown",
"Section": "main",
"Auto": false,
"Name_Values": [ "4x4", "5x4", "4x3", "3x2", "16x9", "16x10", "256x135", "18x9", "19.5x9", "20x9", "21x9", "21.5x9", "32x9", "48x9" ],
"Values": [ "4x4", "5x4", "4x3", "3x2", "16x9", "16x10", "256x135", "18x9", "19.5x9", "20x9", "21x9", "21.5x9", "32x9", "48x9" ],
"Default": 4,
"Description": "UltraCam Beyond ASPECT ratios. It now sets the aspect RATIOS internally\nThis is superior to any other AR patches As it will use internal resolution.",
"Config_Class": [ "ASPECT RATIO" ]
},
"render distance": {
"Name": "Render Distance",
"Class": "dropdown",
Expand Down
74 changes: 35 additions & 39 deletions src/form.py
Original file line number Diff line number Diff line change
Expand Up @@ -355,29 +355,25 @@ def Legacy_appdata():
# log.info(f"{patch}: {self.BEYOND_Patches[patch].get()}")

# Extra Patches. FP and Ui.
self.fp_var = self.on_canvas.create_checkbutton(
master=self.window, canvas=canvas,
text="First Person",
variable="Off",
row=pos_dict["main"][3], cul=pos_dict["main"][4], drop_cul=pos_dict["main"][5],
tags=["bool"], tag="main",
description_name="First Person"
)
new_pos = increase_row(row_2, cul_sel_2, cul_tex_2)
row_2 = new_pos[0]
cul_sel_2 = new_pos[1]
cul_tex_2 = new_pos[2]

UI_list.remove("Black Screen Fix")
self.ui_var = self.on_canvas.create_combobox(
master=self.window, canvas=canvas,
text="UI:",
variable=UI_list[0], values=UI_list,
row=row, cul=cul_tex, drop_cul=cul_sel,width=100,
tags=["text"], tag="main",
description_name="UI"
)
row += 40
# self.fp_var = self.on_canvas.create_checkbutton(
# master=self.window, canvas=canvas,
# text="First Person",
# variable="Off",
# row=pos_dict["main"][3], cul=pos_dict["main"][4], drop_cul=pos_dict["main"][5],
# tags=["bool"], tag="main",
# description_name="First Person"
# )

# UI_list.remove("Black Screen Fix")
# self.ui_var = self.on_canvas.create_combobox(
# master=self.window, canvas=canvas,
# text="UI:",
# variable=UI_list[0], values=UI_list,
# row=row, cul=cul_tex, drop_cul=cul_sel,width=100,
# tags=["text"], tag="main",
# description_name="UI"
# )
# row += 40

# XYZ create patches, not used anymore though.
#create_patches(self)
Expand Down Expand Up @@ -804,7 +800,7 @@ def run_tasks():
def stop_extracting():
self.is_extracting = False

tasklist = [Exe_Running(), DownloadBEYOND(), DownloadUI(), DownloadFP(), UpdateSettings(), Create_Mod_Patch(), Disable_Mods(), stop_extracting()]
tasklist = [Exe_Running(), DownloadBEYOND(), UpdateSettings(), Create_Mod_Patch(), Disable_Mods(), stop_extracting()]
if get_setting("auto-backup") in ["On"]:
tasklist.append(backup(self))
com = 100 // len(tasklist)
Expand Down Expand Up @@ -1139,21 +1135,21 @@ def DownloadUI():
download_unzip(link, Mod_directory)
log.info(f"Downloaded: {new_folder}")

def DownloadFP():
selected_fp_mod = self.fp_var.get()

Mod_directory = os.path.join(self.load_dir, "!!!TOTK Optimizer")
if selected_fp_mod.lower() == "on":
link = FP_Mod
self.progress_var.set(f"Downloading: {selected_fp_mod}\n(May take some time)")
log.info(f"Downloading: {selected_fp_mod}")
os.makedirs(Mod_directory, exist_ok=True)
download_unzip(link, Mod_directory)
log.info(f"Downloaded: {selected_fp_mod}")

fp_dir = os.path.join(Mod_directory, "romfs", "Pack", "Actor", "PlayerCamera.pack.zs")
if selected_fp_mod.lower() == "off" and os.path.exists(fp_dir):
os.remove(fp_dir)
# def DownloadFP():
# selected_fp_mod = self.fp_var.get()

# Mod_directory = os.path.join(self.load_dir, "!!!TOTK Optimizer")
# if selected_fp_mod.lower() == "on":
# link = FP_Mod
# self.progress_var.set(f"Downloading: {selected_fp_mod}\n(May take some time)")
# log.info(f"Downloading: {selected_fp_mod}")
# os.makedirs(Mod_directory, exist_ok=True)
# download_unzip(link, Mod_directory)
# log.info(f"Downloaded: {selected_fp_mod}")

# fp_dir = os.path.join(Mod_directory, "romfs", "Pack", "Actor", "PlayerCamera.pack.zs")
# if selected_fp_mod.lower() == "off" and os.path.exists(fp_dir):
# os.remove(fp_dir)

def Exe_Running():
is_Program_Opened = is_process_running(self.mode + ".exe")
Expand Down
8 changes: 2 additions & 6 deletions src/modules/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,8 @@ def save_user_choices(self, config_file, Legacy_path=None, mode=None):
# This is only required for the UI and FP mods.
if not config.has_section("Options"):
config["Options"] = {}
config['Options']['UI'] = self.ui_var.get()
config['Options']['First Person'] = self.fp_var.get()
# config['Options']['UI'] = self.ui_var.get()
# config['Options']['First Person'] = self.fp_var.get()

# Save the enable/disable choices
for option_name, option_var in self.selected_options.items():
Expand Down Expand Up @@ -135,10 +135,6 @@ def load_user_choices(self, config_file, mode=None):
except AttributeError:
pass

# Load Ui and FP
self.ui_var.set(config.get('Options', 'UI', fallback="None"))
self.fp_var.set(config.get('Options', 'First Person', fallback="Off"))

# Load UltraCam Beyond new patches.
patch_info = self.ultracam_beyond.get("Keys", [""])
for patch in self.BEYOND_Patches:
Expand Down

0 comments on commit df9872e

Please sign in to comment.