To avoid errors like "object has no attribute", add this to Init.
uiUserReport.py
self.popup = None
-----------
Reporting yourself is stupid.
Open uiTarget.py and change:
if app.ENABLE_USER_REPORT_SYSTEM:
if chr.GetInstanceType(self.vid) == chr.INSTANCE_TYPE_PLAYER:
if not player.IsMainCharacterIndex(vid) and self.reportButton:
self.reportButton.Show()
Importing files for every function is ridiculous. Also, creating classes manually is one of the things I hate most in life.
Open game.py, search for it and add it.
if app.ENABLE_USER_REPORT_SYSTEM:
self.targetBoard.BindInterface(self.interface)
Create InterfaceModule.py class (Close, Hide All, MakeWindow and more)
Add InterfaceModule.py:
if app.ENABLE_USER_REPORT_SYSTEM:
def ToggleUserReportWindow(self):
if not self.wndUserReportWindow.IsShow():
self.wndUserReportWindow.Open()
else:
self.wndUserReportWindow.Close()
def UserReportTargetName(self, name):
if self.wndUserReportWindow:
self.wndUserReportWindow.SetTargetName(name)
uiTarget.py Add:
if app.ENABLE_USER_REPORT_SYSTEM:
def BindInterface(self, interface):
self.interface = interface
def OnReportPlayer(self):
if self.interface:
self.interface.UserReportTargetName(self.nameString)
self.interface.ToggleUserReportWindow()
and uiTarget.py Add:
Init Add - > self.interface = None
Destryo Add - > self.interface = None