예제 #1
0
def minesReport((damageCaused, killsCaused, minesTriggered)):
	lines = []
	techs = minesTriggered.keys()
	for techID in techs:
		techName = client.getTechInfo(techID).name.encode()
		text = _('%d of the %s detonated, causing %d damage, killing %d ships in the process.') %\
					(minesTriggered[techID],
					techName,
					damageCaused.get(techID, 0),
					killsCaused.get(techID, 0))
		lines.append(text)
	return '\n'.join(lines)
예제 #2
0
def minesReport((damageCaused, killsCaused, minesTriggered)):
    lines = []
    techs = minesTriggered.keys()
    for techID in techs:
        techName = client.getTechInfo(techID).name.encode()
        text = _('%d of the %s detonated, causing %d damage, killing %d ships in the process.') %\
                    (minesTriggered[techID],
                    techName,
                    damageCaused.get(techID, 0),
                    killsCaused.get(techID, 0))
        lines.append(text)
    return '\n'.join(lines)
예제 #3
0
def techID2Name(techID):
	if techID >= 1000:
		return _(client.getTechInfo(techID).name.encode())
	else:
		return client.getPlayer().shipDesigns[techID].name
예제 #4
0
def techID2Name(techID):
    if techID >= 1000:
        return _(client.getTechInfo(techID).name.encode())
    else:
        return client.getPlayer().shipDesigns[techID].name