Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions Assets/Python/BUG/Tabs/ANDDiplomacyTab.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,6 @@ def create(self, screen):
screen.setEnabled(control, bCanAdjustSettings)
control = self.addCheckbox(screen, left, "DiplomacySettings__CanTradeVassals")
screen.setEnabled(control, bCanAdjustSettings)
# control = self.addCheckbox(screen, left, "DiplomacySettings__CanCapitulate")
# screen.setEnabled(control, bCanAdjustSettings)


self.addSpacer(screen, center, "General1")
control = self.addCheckbox(screen, center, "DiplomacySettings__CanTradePeace")
Expand Down
1 change: 0 additions & 1 deletion Assets/Python/BUG/Tabs/BugACOOptionsTab.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ def create(self, screen):

left, right = self.addTwoColumnLayout(screen, column, "Page", True)

#self.addLabel(screen, left, "ACO", "Advanced Combat Odds:")
self.addCheckbox(screen, left, "ACO__Enabled")
self.addSpacer(screen, left, "ACO_Tab0")

Expand Down
3 changes: 0 additions & 3 deletions Assets/Python/BUG/Tabs/BugAlertsOptionsTab.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,6 @@ def create(self, screen):
self.addCheckbox(screen, center, "MoreCiv4lerts__PermanentAllianceTrade")
self.addCheckbox(screen, center, "MoreCiv4lerts__VassalTrade")
self.addCheckbox(screen, center, "MoreCiv4lerts__PeaceTrade")
#RevolutionDCM start - extra civlerts
#self.addCheckbox(screen, center, "MoreCiv4lerts__WarTrade")
#RevolutionDCM end
self.addCheckbox(screen, center, "MoreCiv4lerts__SurrenderTrade")

# Trades
Expand Down
1 change: 0 additions & 1 deletion Assets/Python/BUG/Tabs/BugAutologOptionsTab.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@ def create(self, screen):

# What to Log
screen.attachHSeparator(column, column + "Sep2")
#col1, col1, col2, col3, col4 = self.addMultiColumnLayout(screen, column, 4, "Events")
left, right = self.addTwoColumnLayout(screen, column, "Events", False)

self.addLabel(screen, left, "Autolog_Builds", "Research and Builds:")
Expand Down
5 changes: 0 additions & 5 deletions Assets/Python/BUG/Tabs/BugConfigTrackerTab.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,9 @@ def create(self, screen):

items = BugConfigTracker.combine()
itemNum = 0
# first = True
for item in items:
itemNum += 1
subitemNum = 0
# if not first:
# screen.attachHSeparator(column, "ItemSep-%d" % itemNum)
# else:
# first = False
self.addLabel(screen, column, item[0], item[0])
for value in item[1]:
subitemNum += 1
Expand Down
3 changes: 0 additions & 3 deletions Assets/Python/BUG/Tabs/BugCreditsOptionsTab.py
Original file line number Diff line number Diff line change
Expand Up @@ -151,8 +151,6 @@ def create(self, screen):
else:
label = "CreditsHeaderLabel%d" % labelNum
self.addLabel(screen, column, label, line)
#screen.setLayoutFlag(label, "LAYOUT_CENTER")
#screen.setLayoutFlag(label, "LAYOUT_SIZE_HPREFERREDEXPANDING")
labelNum += 1
screen.attachHSeparator(column, column + "Sep%d" % sepNum)
sepNum += 1
Expand All @@ -168,6 +166,5 @@ def create(self, screen):
rightText = line[pos+3:]
screen.attachLabel(left, leftLabel, leftText)
screen.setLayoutFlag(leftLabel, "LAYOUT_RIGHT")
#screen.setLayoutFlag(leftLabel, "LAYOUT_SIZE_HPREFERREDEXPANDING")
screen.attachLabel(right, rightLabel, rightText)
labelNum += 1
1 change: 0 additions & 1 deletion Assets/Python/BUG/Tabs/BugNJAGCOptionsTab.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ def create(self, screen):
column = self.addOneColumnLayout(screen, panel)

left, center, right = self.addThreeColumnLayout(screen, column, "Views")
#self.addSpacer(screen, center, "Scores_New_Columns", 3)

self.addCheckbox(screen, left, "NJAGC__AlternateText")
self.addIntDropdown(screen, right, center, "NJAGC__AltTiming")
Expand Down
6 changes: 0 additions & 6 deletions Assets/Python/Contrib/AutoSave.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,17 +14,12 @@


def remove_diacritics(in_text):
# Table des remplacements (caractères + codes explicites)
#print "Start remove_diacritics for %s" % in_text
#print "%s" % str(type(in_text))
text = u''
try :
text = in_text.encode("utf-8")
except :
text = in_text.encode("ascii", "ignore")
#print "%s" % text
text = text.replace('à', 'a').replace('â', 'a').replace('ä', 'a').replace('á', 'a').replace('ã', 'a').replace('å', 'a')
#print "%s" % text
text = text.replace('ç', 'c')
text = text.replace('é', 'e').replace('è', 'e').replace('ê', 'e').replace('ë', 'e')
text = text.replace('î', 'i').replace('ï', 'i').replace('í', 'i')
Expand All @@ -42,7 +37,6 @@ def remove_diacritics(in_text):
text = text.replace('Ÿ', 'Y')
text = text.replace('Ñ', 'N')

#print "%s" % text
return text

def cleanNpc():
Expand Down
7 changes: 0 additions & 7 deletions Assets/Python/Contrib/Civ4lerts.py
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,6 @@ def add(self, alert):
alert.init()

def onCityAcquiredAndKept(self, argsList):
#iOwnerOld, iOwnerNew, city, bConquest, bTrade = argsList
if argsList[1] == GAME.getActivePlayer():
self._resetCity(argsList[2])

Expand Down Expand Up @@ -571,22 +570,18 @@ def init(self, szHurryType):

def onCityBuildingUnit(self, argsList):
city = argsList[0]
#iUnit = argsList[1]
self._onItemStarted(city)

def onCityBuildingBuilding(self, argsList):
city = argsList[0]
#iBuilding = argsList[1]
self._onItemStarted(city)

def onCityBuildingProject(self, argsList):
city = argsList[0]
#iProject = argsList[1]
self._onItemStarted(city)

def onCityBuildingProcess(self, argsList):
city = argsList[0]
#iProcess = argsList[1]
self._onItemStarted(city)

def _onItemStarted(self, city):
Expand Down Expand Up @@ -842,7 +837,6 @@ def onFirstContact(self, argsList):
self.checkIfIsAnyOrHasMetAllTeams(eTeam, eRivalTeam)

def onChangeWar(self, argsList):
#bIsWar = argsList[0]
eTeam = argsList[1]
eRivalTeam = argsList[2]
self.checkIfIsAnyOrHasMetAllTeams(eTeam, eRivalTeam)
Expand All @@ -854,7 +848,6 @@ def onCityRazed(self, argsList):
def onVassalState(self, argsList):
eMaster = argsList[0]
eVassal = argsList[1]
#bVassal = argsList[2]
self.checkIfIsAnyOrHasMetAllTeams(eMaster, eVassal)

def checkIfIsAnyOrHasMetAllTeams(self, *eTeams):
Expand Down
12 changes: 1 addition & 11 deletions Assets/Python/Contrib/DynamicCivNames.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,6 @@ def init():
GC.getInfoTypeForString("LEADER_WU")
)

#bTeamNaming = REV_OPTIONS.isTeamNaming()
#bLeaveHumanName = REV_OPTIONS.isLeaveHumanPlayerName()

if not GAME.isFinalInitialized or GAME.getGameTurn() == GAME.getStartTurn():
for i in xrange(GC.getMAX_PC_PLAYERS()):
onSetPlayerAlive([i, GC.getPlayer(i).isAlive()])
Expand Down Expand Up @@ -81,7 +78,6 @@ def blankHandler(playerID, netUserData, popupReturn):


def onBeginPlayerTurn(argsList):
#iGameTurn = argsList[0]
iPlayer = argsList[1]

# Stuff at end of previous players turn
Expand Down Expand Up @@ -132,7 +128,6 @@ def onBeginPlayerTurn(argsList):


def onCityAcquiredAndKept(argsList):
#iOwnerOld, iOwnerNew, city, bConquest, bTrade = argsList
iPlayer = argsList[1]
owner = GC.getPlayer(iPlayer)
if owner.isAlive() and not owner.isNPC() and owner.getNumCities() < 5 and owner.getNumMilitaryUnits() > 0:
Expand All @@ -153,8 +148,6 @@ def onVassalState(argsList):


def setNewNameByCivics(iPlayer):
#if bLeaveHumanName and (GC.getPlayer(iPlayer).isHuman() or GAME.getActivePlayer() == iPlayer):
# return
[newCivDesc, newCivShort, newCivAdj] = newNameByCivics(iPlayer)

if not newCivDesc == GC.getPlayer(iPlayer).getCivilizationDescription(0):
Expand All @@ -169,8 +162,6 @@ def onSetPlayerAlive(argsList):
bNewValue = argsList[1]
if bNewValue and iPlayerID < GC.getMAX_PC_PLAYERS():
pPlayer = GC.getPlayer(iPlayerID)
#if bLeaveHumanName and (pPlayer.isHuman() or GAME.getActivePlayer() == iPlayerID):
# return
[newCivDesc, newCivShort, newCivAdj] = nameForNewPlayer(iPlayerID)

# Pass to pPlayer seems to require a conversion to 'ascii'
Expand Down Expand Up @@ -349,8 +340,7 @@ def newNameByCivics(iPlayer):
return [curDesc, curShort, curAdj] # Maintain name of BarbarianCiv created player

# Special options for teams and permanent alliances
#if bTeamNaming and pTeam.getNumMembers() > 1: # and pTeam.getPermanentAllianceTradingCount() > 0:
if pTeam.getNumMembers() > 1: # and pTeam.getPermanentAllianceTradingCount() > 0:
if pTeam.getNumMembers() > 1:

iLeader = pTeam.getLeaderID()

Expand Down
27 changes: 1 addition & 26 deletions Assets/Python/Contrib/EventSigns.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,26 +105,6 @@ def clearCurrentSigns ():
global gCurrentSigns
gCurrentSigns = None


'''
def clearSignsAndLandmarks(pPlot):
""" Removes any current landmarks or signs from a plot.

In order to place a new sign or landmark I'd like to remove any pre-existing sign
or landmark on the plot. However, there seems to be some delay or synch issue.
Every attempt I have thus far made would remove the old one but the new one would
not show up. So for now, I am not removing old signs/landmarks and thus the event
will only place the sign/landmark on a plot if there isn't already one there.
If I could resolve that issue, this function would actually be used. ;)
"""
for iPlayer in range(GC.getMAX_PLAYERS()):
engine.removeSign(pPlot, iPlayer)
engine.removeLandmark(pPlot)
# Don't even know what this does; it was the last of my failed attempts to force the signs to show.
#engine.setDirty(EngineDirtyBits.GlobeTexture_DIRTY_BIT, True)
return True
'''

def placeLandmark(pPlot, sEventType, iFood, iProd, iComm, bIsSign, iSignOwner):
""" Places a landmark on a plot identifying a yield change with a short description.

Expand All @@ -142,9 +122,6 @@ def placeLandmark(pPlot, sEventType, iFood, iProd, iComm, bIsSign, iSignOwner):
# Bail out if there are no yield changes
if iFood == 0 and iProd == 0 and iComm == 0: return False

# This next bit is unused; see the docstring at the start of that function for why.
#clearSignsAndLandmarks(pPlot)

sCaptionFood = ""
sCaptionProd = ""
sCaptionComm = ""
Expand Down Expand Up @@ -475,10 +452,8 @@ def onLoadGame(self, argsList):
global g_bForceUpdate
g_bForceUpdate = True

def onPreSave(self, argsList):
def onPreSave(self, argsList): #TODO remove this method since it is empty
""" Called before a game is actually saved """
# if (gSavedSigns and (not gSavedSigns.isEmpty())):
# SdToolKit.sdSetGlobal(SD_MOD_ID, SD_VAR_ID, gSavedSigns)

def onPlotRevealed(self, argsList):
""" Called when plot is revealed to team. """
Expand Down
1 change: 0 additions & 1 deletion Assets/Python/Contrib/MoreCiv4lerts.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,6 @@ def onBeginActivePlayerTurn(self, argsList):
self.CheckForAlerts(iPlayer, True)

def onCityAcquiredAndKept(self, argsList):
#iOwnerOld, iOwnerNew, city, bConquest, bTrade = argsList
if not self.getCheckForDomVictory():
return
if argsList[1] == GAME.getActivePlayer():
Expand Down
Empty file.
2 changes: 1 addition & 1 deletion Assets/Python/Contrib/Roman.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ class OutOfRangeError(RomanError): pass
('IV', 4),
('I', 1)
)
# Makes the Number into RomsnNumber
# Makes the Number into RomanNumber
def toRoman(Number):
"""convert integer to Roman numeral"""

Expand Down
17 changes: 1 addition & 16 deletions Assets/Python/Contrib/StatusDump.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,21 +14,14 @@ class statusdumpInstance:

def __init__(self):
self.MsgStore = []
self.FileName = "StatusDump.txt" #BugAutolog.getFileName()
self.FileName = "StatusDump.txt"

def setFileName(self, FileName, bSaveToOptions=False):
#if (bSaveToOptions):
# BugAutolog.setFileName(LogFileName)
# TODO: do we need to save this?
# BugOptions.write()
self.FileName = "StatusDump.txt"

def getFileName(self):
return self.FileName

# def isLogging(self):
# return BugAutolog.isLoggingOn()

def writeStatusDump(self, vMsg, vColor = "Black", vBold = False, vUnderline = False, vPrefix = ""):

if len(self.MsgStore) > 0:
Expand Down Expand Up @@ -102,11 +95,3 @@ def buildMsg(self, vMsg, vColor, vBold, vUnderline, vPrefix):
zMsg = "[color=%s]%s[/color]" % (vColor, zMsg)

return "%s\r\n" % (zMsg)

# EF: What is this unused class for?
#class autologRetain:

# def __init__(self):
# bLogFileOpen = False
# bPlayerHuman = False
# Counter = 0
17 changes: 5 additions & 12 deletions Assets/Python/Contrib/TechWindow.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
## TechWindowWide
##
## Originally by SirRethcir: Techanzeige hinzugefügt
## Originally by SirRethcir: Techanzeige hinzugef�gt
## Enhanced by Roamty, Caesium, Guarav
##
## Copyright (c) 2008 The BUG Mod.
Expand Down Expand Up @@ -58,8 +58,6 @@ def __init__(self, iScreenID):

self.W_ICON = 96 # 90
self.H_ICON = 96 # 90
# self.X_ICON = self.X_UPPER_PANEL + 134
# self.Y_ICON = self.Y_UPPER_PANEL + (self.H_UPPER_PANEL / 2) - (self.H_ICON / 2) + 17

self.X_ICON_PANEL = self.X_UPPER_PANEL + self.iMarginSpace + 2
self.Y_ICON_PANEL = self.Y_UPPER_PANEL + self.iMarginSpace + 30
Expand All @@ -70,13 +68,11 @@ def __init__(self, iScreenID):
self.Y_ICON = self.Y_ICON_PANEL + self.H_ICON_PANEL / 2 - self.H_ICON / 2

self.X_QUOTE = 550
# self.Y_QUOTE = self.Y_UPPER_PANEL + self.iMarginSpace + 36
self.Y_QUOTE = self.Y_ICON - 25
self.W_QUOTE = 455
# self.H_QUOTE = self.H_UPPER_PANEL - (self.iMarginSpace * 2) - 38
self.H_QUOTE = 135

#---Geändert START - siehe original Datei -----------------
#---Ge�ndert START - siehe original Datei -----------------
# Lower Panel

self.X_LOWER_PANEL = self.X_MAIN_PANEL + self.iMarginSpace
Expand All @@ -103,7 +99,7 @@ def __init__(self, iScreenID):
self.Y_ALLOWS_PANEL2 = self.Y_SPECIAL_PANEL + self.H_ALLOWS_PANEL + self.H_ALLOWS_SPACE
self.Y_ALLOWS_PANEL3 = self.Y_SPECIAL_PANEL + 2 * (self.H_ALLOWS_PANEL + self.H_ALLOWS_SPACE)
self.Y_ALLOWS_PANEL4 = self.Y_SPECIAL_PANEL + 3 * (self.H_ALLOWS_PANEL + self.H_ALLOWS_SPACE)
#---Geändert ENDE ------------------------------------------
#---Ge�ndert ENDE ------------------------------------------

# Contents

Expand Down Expand Up @@ -134,9 +130,6 @@ def interfaceScreen(self, iTech):

# Create panels

# Main Panel
# screen.addPanel("TechSplashMainPanel", "", "", True, True, self.X_MAIN_PANEL, self.Y_MAIN_PANEL, self.W_MAIN_PANEL, self.H_MAIN_PANEL, PanelStyles.PANEL_STYLE_MAIN)

# Icon Panel
pnl = "IconPanelGlow"
screen.addPanel(pnl, "", "", True, True, self.X_ICON_PANEL, self.Y_ICON_PANEL, self.W_ICON_PANEL, self.H_ICON_PANEL, PanelStyles.PANEL_STYLE_MAIN_TAN15)
Expand Down Expand Up @@ -223,7 +216,7 @@ def interfaceScreen(self, iTech):
if self.iTech == iPrereq:
screen.attachImageButton(panelName4, "", GC.getTechInfo(j).getButton(), GenericButtonSizes.BUTTON_SIZE_CUSTOM, WidgetTypes.WIDGET_PEDIA_JUMP_TO_DERIVED_TECH, j, self.iTech, False)

#---Eingefügt ENDE ------------------------------------------------
#---Eingef�gt ENDE ------------------------------------------------

# Units Enabled
szUnitsTitleDesc = "<font=3b>" + TRNSLTR.getText("TXT_KEY_PEDIA_UNITS_ENABLED", ()) + ":"
Expand Down Expand Up @@ -255,7 +248,7 @@ def interfaceScreen(self, iTech):
if GC.getPromotionInfo(j).getTechPrereq() == self.iTech:
screen.attachImageButton(panelName3, "", GC.getPromotionInfo(j).getButton(), GenericButtonSizes.BUTTON_SIZE_CUSTOM, WidgetTypes.WIDGET_PEDIA_JUMP_TO_PROMOTION, j, 1, False)

#---Eingefügt START - kann komplett gelöscht werden --------------
#---Eingef�gt START - kann komplett gel�scht werden --------------

# Improvements
for j in range(GC.getNumBuildInfos()):
Expand Down
Loading