|
From: <sjo...@us...> - 2014-02-08 07:41:46
|
Revision: 4673
http://sourceforge.net/p/civ4mods/code/4673
Author: sjodster
Date: 2014-02-08 07:41:40 +0000 (Sat, 08 Feb 2014)
Log Message:
-----------
Modified BUG/WidgetUtil.py to make it compatible with the traditional means of specifying custom Python widgets via WIDGET_PYTHON
* World Builder should be fully functional now
* Made a slight tweak to the world builder handling code in CvGameUtils::getWidgetHelp to accommodate a previous interface change to getImprovementHelp
The world builder seems happy now, but additional testing is welcome to be sure there aren't any remaining issues.
This update is game save compatible.
Modified Paths:
--------------
realism/bts/trunk/mod/Assets/Python/Components/BUG/WidgetUtil.py
realism/bts/trunk/mod/Assets/Python/CvGameUtils.py
Modified: realism/bts/trunk/mod/Assets/Python/Components/BUG/WidgetUtil.py
===================================================================
--- realism/bts/trunk/mod/Assets/Python/Components/BUG/WidgetUtil.py 2014-02-08 05:51:16 UTC (rev 4672)
+++ realism/bts/trunk/mod/Assets/Python/Components/BUG/WidgetUtil.py 2014-02-08 07:41:40 UTC (rev 4673)
@@ -41,6 +41,9 @@
from CvPythonExtensions import *
import BugConfig
import BugUtil
+# MOD - START - Traditional Python Widget Compatibility
+import BugGameUtils
+# MOD - END - Traditional Python Widget Compatibility
## Widget Types
@@ -121,6 +124,10 @@
func = g_widgetHelp.get(eWidgetType)
if func:
return func(eWidgetType, iData1, iData2, bOption)
+ # MOD - START - Traditional Python Widget Compatibility
+ if eWidgetType == WidgetTypes.WIDGET_PYTHON:
+ return BugGameUtils.getDispatcher()._baseUtils.getWidgetHelp(argsList)
+ # MOD - END - Traditional Python Widget Compatibility
return u""
Modified: realism/bts/trunk/mod/Assets/Python/CvGameUtils.py
===================================================================
--- realism/bts/trunk/mod/Assets/Python/CvGameUtils.py 2014-02-08 05:51:16 UTC (rev 4672)
+++ realism/bts/trunk/mod/Assets/Python/CvGameUtils.py 2014-02-08 07:41:40 UTC (rev 4673)
@@ -445,7 +445,10 @@
return CyGameTextMgr().parseLeaderTraits(iLeader, -1, False, False)
## Improvement Widget Text##
elif iData1 == 7877:
- return CyGameTextMgr().getImprovementHelp(iData2, False)
+ # MOD - START - Improved Civilopedia
+ #return CyGameTextMgr().getImprovementHelp(iData2, False)
+ return CyGameTextMgr().getImprovementHelp(iData2, False, False)
+ # MOD - END - Improved Civilopedia
## Bonus Widget Text##
elif iData1 == 7878:
return CyGameTextMgr().getBonusHelp(iData2, False)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|