Return to repo list

opet

Oblivion Proton .esp Tool
Return to HMagellan.com

commit f32c4f453ef57429fe9e25cfcfc9402e8224d3cf
parent e79e5e51be6815c0f06efc6adc126fb1c311a3fd
Author: Erik Letson <hmagellan@hmagellan.com>
Date:   Thu,  7 Jan 2021 15:06:40 -0600

added path defaults

Diffstat:
Menvironment.json | 8+++++---
Msrc/filer.py | 3+++
Msrc/opet.py | 12++++++------
3 files changed, 14 insertions(+), 9 deletions(-)

diff --git a/environment.json b/environment.json @@ -1,5 +1,7 @@ { - "OblivionPath" : "", - "OblivionPrefixPath" : "", - "StoragePath" : "" + "OblivionPath" : "~/.steam/steamapps/common/Oblivion", + "OblivionDataPath" : "~/.steam/steamapps/common/Oblivion/Data", + "OblivionPrefixPath" : "~/.steam/steamapps/compatdata/22330/pfx", + "OblivionPrefixAppdata" : "~/.steam/steamapps/compatdata/22330/pfx/drive_c/users/steamuser/Local\ Settings/Application\ Data/Oblivion", + "StoragePath" : "~/.local/share/opet" } diff --git a/src/filer.py b/src/filer.py @@ -22,6 +22,9 @@ class Filer(object): self.environment_file = environment_file self.environment = self.read_json(self.environment_file) + def get_environment(self): + return self.environment + def read_raw_file(self, filename): with open(filename, "r") as f: return f.read() diff --git a/src/opet.py b/src/opet.py @@ -92,8 +92,11 @@ class OPETFrame(wx.Frame): self.menu_bar.Append(self.help_menu, "&Help") self.SetMenuBar(self.menu_bar) + # Load info from files/other utilities + self.espjson = self.manager.filer.read_json(os.path.join("default", "DefaultPlugins.json")) + #self.load_order = self.manager.esp_tool.get_load_order_list(os.path.join(self.filer.get_environment()["OblivionPrefixAppdata"]) + # Construct esp list - espjson = self.manager.filer.read_json(os.path.join("default", "DefaultPlugins.json")) self.drag_list_ctrl = wxcustom.EditableListCtrl(self) self.drag_list_ctrl.InsertColumn(0, "Enabled") self.drag_list_ctrl.InsertColumn(1, "Order") @@ -101,12 +104,9 @@ class OPETFrame(wx.Frame): self.drag_list_ctrl.InsertColumn(3, "Comment") index = 0 - for e in espjson["discovered"]: - entry = ["0", index, e, espjson["comments"][e] if e in espjson["comments"] else ""] + for e in self.espjson["discovered"]: + entry = ["0", index, e, self.espjson["comments"][e] if e in self.espjson["comments"] else ""] self.drag_list_ctrl.Append(entry) - #self.drag_list_ctrl.InsertItem(0, "") - #self.drag_list_ctrl.SetItem(0, 1, str(index)) - #self.drag_list_ctrl.SetItem(0, 2, e) index += 1 def on_new_profile(self, event):