Fix fighter abilities and do not rely on effects' removed attributes anymore
This commit is contained in:
@@ -21,8 +21,6 @@ class ItemEffects(wx.Panel):
|
||||
self.SetSizer(mainSizer)
|
||||
|
||||
self.Bind(wx.EVT_LIST_ITEM_ACTIVATED, self.OnClick, self.effectList)
|
||||
if config.debug:
|
||||
self.Bind(wx.EVT_LIST_ITEM_RIGHT_CLICK, self.OnRightClick, self.effectList)
|
||||
|
||||
self.PopulateList()
|
||||
|
||||
@@ -100,26 +98,6 @@ class ItemEffects(wx.Panel):
|
||||
|
||||
self.RefreshValues(event)
|
||||
|
||||
def OnRightClick(self, event):
|
||||
"""
|
||||
Debug use: open effect file with default application.
|
||||
If effect file does not exist, create it
|
||||
"""
|
||||
|
||||
effect = self.effects[event.GetText()]
|
||||
|
||||
file_ = os.path.join(config.pyfaPath, "eos", "effects", "%s.py" % effect.handlerName)
|
||||
|
||||
if not os.path.isfile(file_):
|
||||
open(file_, 'a').close()
|
||||
|
||||
if 'wxMSW' in wx.PlatformInfo:
|
||||
os.startfile(file_)
|
||||
elif 'wxMac' in wx.PlatformInfo:
|
||||
os.system("open " + file_)
|
||||
else:
|
||||
subprocess.call(["xdg-open", file_])
|
||||
|
||||
def RefreshValues(self, event):
|
||||
self.Freeze()
|
||||
self.effectList.ClearAll()
|
||||
|
||||
Reference in New Issue
Block a user