mirror of
https://github.com/shlomif/PySolFC.git
synced 2025-04-05 00:02:29 -04:00
* bugfixes
git-svn-id: file:///home/shlomif/Backup/svn-dumps/PySolFC/svnsync-repos/pysolfc/PySolFC/trunk@186 efabe8c0-fbe8-4139-b769-b5e6d273206e
This commit is contained in:
parent
6bb2e86dc9
commit
638f2e04ab
4 changed files with 6 additions and 4 deletions
|
@ -1190,7 +1190,7 @@ Please select a %s type %s.
|
||||||
if gi is None: return None
|
if gi is None: return None
|
||||||
if gi.rules_filename is not None:
|
if gi.rules_filename is not None:
|
||||||
return gi.rules_filename
|
return gi.rules_filename
|
||||||
n = gi.name
|
n = gi.en_name # english name
|
||||||
##n = re.sub(r"[\[\(].*$", "", n)
|
##n = re.sub(r"[\[\(].*$", "", n)
|
||||||
n = latin1_to_ascii(n)
|
n = latin1_to_ascii(n)
|
||||||
n = re.sub(r"[^\w]", "", n)
|
n = re.sub(r"[^\w]", "", n)
|
||||||
|
@ -1205,7 +1205,7 @@ Please select a %s type %s.
|
||||||
if os.path.supports_unicode_filenames: # new in python 2.3
|
if os.path.supports_unicode_filenames: # new in python 2.3
|
||||||
return self.getGameTitleName(id)
|
return self.getGameTitleName(id)
|
||||||
gi = self.gdb.get(id)
|
gi = self.gdb.get(id)
|
||||||
n = gi.name
|
n = gi.en_name # english name
|
||||||
if not n: return None
|
if not n: return None
|
||||||
## m = re.search(r"^(.*)([\[\(](\w+).*[\]\)])\s*$", n)
|
## m = re.search(r"^(.*)([\[\(](\w+).*[\]\)])\s*$", n)
|
||||||
## if m:
|
## if m:
|
||||||
|
|
|
@ -418,6 +418,7 @@ class GameInfo(Struct):
|
||||||
ncards = decks * (len(suits) * len(ranks) + len(trumps))
|
ncards = decks * (len(suits) * len(ranks) + len(trumps))
|
||||||
game_flags = game_type & ~1023
|
game_flags = game_type & ~1023
|
||||||
game_type = game_type & 1023
|
game_type = game_type & 1023
|
||||||
|
en_name = name # for Application.getGameRulesFilename
|
||||||
name = gettext_name(name)
|
name = gettext_name(name)
|
||||||
if not short_name:
|
if not short_name:
|
||||||
short_name = name
|
short_name = name
|
||||||
|
@ -473,7 +474,7 @@ class GameInfo(Struct):
|
||||||
#
|
#
|
||||||
Struct.__init__(self, id=id, gameclass=gameclass,
|
Struct.__init__(self, id=id, gameclass=gameclass,
|
||||||
name=name, short_name=short_name,
|
name=name, short_name=short_name,
|
||||||
altnames=tuple(altnames),
|
altnames=tuple(altnames), en_name=en_name,
|
||||||
decks=decks, redeals=redeals, ncards=ncards,
|
decks=decks, redeals=redeals, ncards=ncards,
|
||||||
category=category, skill_level=skill_level,
|
category=category, skill_level=skill_level,
|
||||||
suits=tuple(suits), ranks=tuple(ranks),
|
suits=tuple(suits), ranks=tuple(ranks),
|
||||||
|
|
|
@ -283,7 +283,7 @@ class ThreePeaksNoScore(ThreePeaks):
|
||||||
|
|
||||||
|
|
||||||
registerGame(GameInfo(22216, ThreePeaks, "Three Peaks",
|
registerGame(GameInfo(22216, ThreePeaks, "Three Peaks",
|
||||||
GI.GT_PAIRING_TYPE, 1, 0, GI.SL_BALANCED,
|
GI.GT_PAIRING_TYPE | GI.GT_SCORE, 1, 0, GI.SL_BALANCED,
|
||||||
altnames=("Tri Peaks",)
|
altnames=("Tri Peaks",)
|
||||||
))
|
))
|
||||||
registerGame(GameInfo(22231, ThreePeaksNoScore, "Three Peaks Non-scoring",
|
registerGame(GameInfo(22231, ThreePeaksNoScore, "Three Peaks Non-scoring",
|
||||||
|
|
|
@ -548,6 +548,7 @@ class SelectGameDialogWithPreview(SelectGameDialog):
|
||||||
def updateInfo(self, gameid):
|
def updateInfo(self, gameid):
|
||||||
gi = self.app.gdb.get(gameid)
|
gi = self.app.gdb.get(gameid)
|
||||||
# info
|
# info
|
||||||
|
name = gi.name
|
||||||
altnames = '\n'.join(gi.altnames)
|
altnames = '\n'.join(gi.altnames)
|
||||||
category = _(CSI.TYPE[gi.category])
|
category = _(CSI.TYPE[gi.category])
|
||||||
type = ''
|
type = ''
|
||||||
|
|
Loading…
Add table
Reference in a new issue