I've made a change to Arsenal's PrintWeapon function:
def PrintWeapons( self, player ):
if not player or self.GetLevel( player ) > maxLevel:
return
arWeapons = ""
for i in range( self.GetLevel( player ), maxLevel ):
name = GEWeapon.WeaponPrintName( weaponList[i][0] )
arWeapons += "Level %i: #%s\n" % ( i + 1, name )
if arWeapons.count( ":" ) == 5:
break
arWeapons += "\nFinal level %i: #%s\n" % ( len( weaponList ), GEWeapon.WeaponPrintName( weaponList[-1][0] ) )
GEUtil.PopupMessage( player, "#GES_GP_ARSENAL_NAME", arWeapons )
I do not like the function you made because it shows the next 5 levels and
always the final level. This doesn't work because if you're on the final level, and press g, it shows that one. I've corrected that by
always showing the current level, the next four levels and the final level. The reason I've chosen this route is because you have not bypassed your weapon, so it should show it in the popup window as you're still on it. This could be good for if you've joined a game late and you're wanting to know which level you're been given or if you've been stuck on a level and want to refresh your memory which it is. With my way, a return statement is only needed when the player wins the round. If you were to always show what's in the future, a return statement would have to be written for when the player's on the final weapon and when he has won the game. Also, if a player is on the final weapon, they're hitting g trying to find out what's left, and they're not seeing anything, they might get confused and wonder why nothing is happening.
I'd also like to note that making final weapon all capitalized like so "FINAL WEAPON" looked like hell. You've already drawn enough attention to that line with a double line break. That is plenty.