Merge BUG with my MOD, please help

CHINCHIN

Chieftain
Joined
Jul 8, 2004
Messages
57
Location
Spain
What is the odd behavior or error message that you're getting?
 
What buttons do you mean? Which buttons don't work?
 
They are buttons for units incorporating my mod. Submerging submarine, taking ammunition...

These work perfectly in my mod, but merge with the BUG fail.

Are the lines that are incorporated into the file "CvMainInterface.py"
Spoiler :
###### Unit Buttons ######
pUnit = g_pSelectedUnit
iUnitType = pUnit.getUnitType()
pUnitOwner = gc.getPlayer(pUnit.getOwner())
if pUnitOwner.isTurnActive():
if iUnitType == CvUtil.findInfoTypeNum(gc.getUnitInfo, gc.getNumUnitInfos(), "UNIT_SUBMARINE"):
if pUnit.isMadeAttack() == false and pUnit.canMove():
screen.appendMultiListButton( "BottomButtonContainer", ArtFileMgr.getInterfaceArtInfo("SUB1").getPath(), 0, WidgetTypes.WIDGET_GENERAL,665, 665, False )
screen.show( "BottomButtonContainer" )
iCount = iCount + 1
if iUnitType == CvUtil.findInfoTypeNum(gc.getUnitInfo, gc.getNumUnitInfos(), "UNIT_ATTACK_SUBMARINE"):
if pUnit.canMove():
screen.appendMultiListButton( "BottomButtonContainer", ArtFileMgr.getInterfaceArtInfo("SUB2").getPath(), 0, WidgetTypes.WIDGET_GENERAL,666, 666, False )
screen.show( "BottomButtonContainer" )
iCount = iCount + 1
if pUnit.puedeSerRecargadaMuniciones():
screen.appendMultiListButton( "BottomButtonContainer", ArtFileMgr.getInterfaceArtInfo("BALAS1").getPath(), 0, WidgetTypes.WIDGET_GENERAL,667, 667, False )
screen.show( "BottomButtonContainer" )
iCount = iCount + 1
if pUnit.puedeSerRecargadaTotalMuniciones():
screen.appendMultiListButton( "BottomButtonContainer", ArtFileMgr.getInterfaceArtInfo("BALAS4").getPath(), 0, WidgetTypes.WIDGET_GENERAL,668, 668, False )
screen.show( "BottomButtonContainer" )
iCount = iCount + 1
if pUnit.puedeSerRecargadaCombustible():
screen.appendMultiListButton( "BottomButtonContainer", ArtFileMgr.getInterfaceArtInfo("FUEL1").getPath(), 0, WidgetTypes.WIDGET_GENERAL,669, 669, False )
screen.show( "BottomButtonContainer" )
iCount = iCount + 1
if pUnit.puedeSerRecargadaTotalCombustible():
screen.appendMultiListButton( "BottomButtonContainer", ArtFileMgr.getInterfaceArtInfo("FUEL4").getPath(), 0, WidgetTypes.WIDGET_GENERAL,670, 670, False )
screen.show( "BottomButtonContainer" )
iCount = iCount + 1
if pUnit.puedeRepartirMuniciones():
screen.appendMultiListButton( "BottomButtonContainer", ArtFileMgr.getInterfaceArtInfo("MUNICION").getPath(), 0, WidgetTypes.WIDGET_GENERAL,671, 671, False )
screen.show( "BottomButtonContainer" )
iCount = iCount + 1
if pUnit.puedeRepartirCombustible():
screen.appendMultiListButton( "BottomButtonContainer", ArtFileMgr.getInterfaceArtInfo("COMBUSTIBLE").getPath(), 0, WidgetTypes.WIDGET_GENERAL,672, 672, False )
screen.show( "BottomButtonContainer" )
iCount = iCount + 1
 
I think the problem is that my MOD files "CvEventManager.py" and "CvGameUtils.py", conflict with the BUG.

It does not seem that the solution is easy.

Thanks Lemon Merchant

The way BUG works is that you don't have your version of either file. You have your events and utilities in a different file and tell BUG through the init.xml and other files what parts of the Event manager and Game Utilis you are extending or overwriting.
 
edit sorry that is not quite the full or true picture - I have had food poisoning, which means no coffee of solids for a week; I think my bacon levels have plummeted too far. ;)

You can have your own event manager and games utils files you just cant call them that. I think Orion Veteran does exactly this in his Immigration mod. This might provide a clear example for you to look at.

edit Gah - I was trying to edit my previous post. I need bacon and perhaps coffee too:lol:
 
Top Bottom