Skip to content

Commit f24352f

Browse files
v2 beta 5 update
1 parent dbdacd5 commit f24352f

19 files changed

+2951
-1786
lines changed

changelog.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,44 @@
1+
# 2.00.0 Beta 5
2+
3+
* The GUI is now resizable.
4+
* GUI optimizations have been made. It's unlikely you'll notice a difference using it,
5+
but it's easier to maintain now.
6+
* Europe has been moved further up the default English region order, as Retool's new
7+
language prioritization bypasses any particular issues there.
8+
* Added an extra filter stage for compilations, checking for which title has more of the
9+
user's languages.
10+
* Fixed titles with multiple regions not being categorized into the correct primary
11+
region. For example, `(Europe, Australia)` titles were being filtered into the
12+
`Australia` region instead of `Europe`, which caused some duplicates to sneak through
13+
to the final output DAT.
14+
* The [`Export`](http://redump.org/discs/region/Ex/) region for Redump titles is now
15+
treated as equivalent to `World`.
16+
* Fixed a problem where a new system config would populate selected languages from the
17+
global config.
18+
* Fixed the log not outputting in the correct folder when a system output was selected.
19+
* Fixed the parent/clone clash warning message so it displayed the correct clone title.
20+
21+
122
# 2.00.0 Beta 4
223

324
* Pirate and unlicensed exclusions work again. Pirate titles have been added to
425
the unlicensed exclude option.
526
* The GUI documentation link now goes to the right place.
627

28+
729
# 2.00.0 Beta 3
830

931
* Fixed user filter excludes not removing some excludes.
1032
* Fixed system name formatting in the GUI, so the right system settings file is
1133
referenced.
1234
* Unified CLI and GUI versions, as splitting them was no longer useful.
1335

36+
1437
# 2.00.0 Beta 2
1538

1639
A minor update to fix system user filters for No-Intro's _Redump Custom DATs_.
1740

41+
1842
# 2.00.0 Beta 1
1943

2044
Retool 2.0 is here in beta form. Ten months in the making, it'll be in beta for

docs/changelog.md

Lines changed: 26 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,23 +5,47 @@ hide:
55

66
# Changelog
77

8-
# 2.00.0 Beta 4
8+
## 2.00.0 Beta 5
9+
10+
* The GUI is now resizable.
11+
* GUI optimizations have been made. It's unlikely you'll notice a difference using it,
12+
but it's easier to maintain now.
13+
* Europe has been moved further up the default English region order, as Retool's new
14+
language prioritization bypasses any particular issues there.
15+
* Added an extra filter stage for compilations, checking for which title has more of the
16+
user's languages.
17+
* Fixed titles with multiple regions not being categorized into the correct primary
18+
region. For example, `(Europe, Australia)` titles were being filtered into the
19+
`Australia` region instead of `Europe`, which caused some duplicates to sneak through
20+
to the final output DAT.
21+
* The [`Export`](http://redump.org/discs/region/Ex/) region for Redump titles is now
22+
treated as equivalent to `World`.
23+
* Fixed a problem where a new system config would populate selected languages from the
24+
global config.
25+
* Fixed the log not outputting in the correct folder when a system output was selected.
26+
* Fixed the parent/clone clash warning message so it displayed the correct clone title.
27+
28+
29+
## 2.00.0 Beta 4
930

1031
* Pirate and unlicensed exclusions work again. Pirate titles have been added to
1132
the unlicensed exclude option.
1233
* The GUI documentation link now goes to the right place.
1334

14-
# 2.00.0 Beta 3
35+
36+
## 2.00.0 Beta 3
1537

1638
* Fixed user filter excludes not removing some excludes.
1739
* Fixed system name formatting in the GUI, so the right system settings file is
1840
referenced.
1941
* Unified CLI and GUI versions, as splitting them was no longer useful.
2042

43+
2144
## 2.00.0 Beta 2
2245

2346
A minor update to fix system user filters for No-Intro's _Redump Custom DATs_.
2447

48+
2549
## 2.00.0 Beta 1
2650

2751
Retool 2.0 is here in beta form. Ten months in the making, it'll be in beta for

docs/includes/file.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
[retool-2.00.0-beta-4-win-x86-64.zip](https://unexpectedpanda.github.io/files/retool-2.00.0-beta-4-win-x86-64.zip)
1+
[retool-2.00.0-beta-5-win-x86-64.zip](https://unexpectedpanda.github.io/files/retool-2.00.0-beta-5-win-x86-64.zip)

docs/includes/sha256.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
e53751dbafd1ba301d98ae1b879d25eea4c074f740be1c203a9be242fc45544f
1+
f574295a65c30eb96e3a32dd7d4d006dd9f1c53cdc1c6e91b3cdcc93198e2060

modules/chooseparent.py

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -168,6 +168,10 @@ def choose_compilations(title_set: set[DatNode], all_titles: dict[str, list[DatN
168168

169169
if report_on_match: TraceTools.trace_title('REF0070', [group], group_titles, keep_remove=False)
170170

171+
# Do a more thorough language check
172+
group_titles = ParentTools.choose_language(set(titles), config, report_on_match, first_time=False)
173+
if report_on_match: TraceTools.trace_title('REF0089', [group], group_titles, keep_remove=False)
174+
171175
# Tie breaker: if there's a compilation and an individual title remaining, choose the individual title
172176
if len(group_titles) == 2:
173177
individual_title: set[DatNode] = set([x for x in group_titles if not x.contains_titles])
@@ -1300,19 +1304,18 @@ def detect_parent_clone_clash(processed_titles: dict[str, list[DatNode]], config
13001304
if another_title.cloneof == title.full_name:
13011305
parent_clash[title.full_name].add(another_title.full_name)
13021306

1303-
if config.user_input.verbose:
1304-
for key, values in parent_clash.items():
1305-
if (
1306-
values
1307-
and config.user_input.dev_mode):
1308-
eprint(f'\n{Font.warning}* {Font.warning_bold}{key}{Font.warning} should be a parent, but is set as a clone of\n {Font.warning_bold}{assigned_clone}{Font.warning}{Font.end}')
1309-
eprint(f'\n {Font.warning}This likely isn\'t an issue, and just a side effect of region and language settings.{Font.end}')
1310-
eprint(f'\n {Font.warning}Titles that have {Font.warning_bold}{key}{Font.warning} as a parent:{Font.end}\n')
1307+
if config.user_input.verbose:
1308+
if config.user_input.dev_mode:
1309+
eprint(f'\n{Font.warning}* {Font.warning_bold}{title.full_name}{Font.warning} should be a parent, but is set as a clone of\n {Font.warning_bold}{assigned_clone}{Font.warning}{Font.end}')
1310+
eprint(f'\n {Font.warning}This likely isn\'t an issue, and just a side effect of region and language settings.{Font.end}')
1311+
eprint(f'\n {Font.warning}Titles that have {Font.warning_bold}{title.full_name}{Font.warning} as a parent:{Font.end}\n')
13111312

1312-
for value in values:
1313-
eprint(f' {Font.disabled}- {value}{Font.end}')
1313+
for key, values in parent_clash.items():
1314+
if key == title.full_name:
1315+
for value in values:
1316+
eprint(f' {Font.disabled}- {value}{Font.end}')
13141317

1315-
eprint(f'\n {Font.warning}Removing clone from {Font.warning_bold}{key}{Font.end}\n')
1318+
eprint(f'\n {Font.warning}Removing clone from {Font.warning_bold}{key}{Font.end}\n')
13161319

13171320
return processed_titles
13181321

modules/config.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -390,7 +390,9 @@ def key_missing(section_key: str) -> None:
390390

391391
uk_index = self.region_order_default.index('UK')
392392
self.region_order_default[uk_index + 1:uk_index + 1] = ['United Kingdom']
393-
self.regex.region_order_default = re.compile('\\s\\((?:\\w*,\\s)*(?:' + '|'.join(self.region_order_default) + ')(?:,\\s\\w*)*\\)')
393+
394+
# Add "Export" to the default region order regex as a pseudo-region, which is reinterpreted as "World" later
395+
self.regex.region_order_default = re.compile('\\s\\((?:\\w*,\\s)*(?:' + '|'.join(self.region_order_default + ['Export']) + ')(?:,\\s\\w*)*\\)')
394396

395397
if 'UK' in self.languages_implied:
396398
self.languages_implied['United Kingdom'] = self.languages_implied['UK']

modules/constants.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Set the user files and options
22
VERSION_MAJOR: str = '2.00'
3-
VERSION_MINOR: str = '0 Beta 4'
3+
VERSION_MINOR: str = '0 Beta 5'
44
CLONE_LIST_METADATA_DOWNLOAD_LOCATION: str = 'https://raw.githubusercontent.com/unexpectedpanda/retool-clonelists-metadata/main'
55
CLONE_LIST_METADATA_DOWNLOAD_LOCATION_KEY: str = 'cloneListMetadataUrl'
66
PROGRAM_DOWNLOAD_LOCATION: str = 'https://raw.githubusercontent.com/unexpectedpanda/retool/main'

modules/dats.py

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,12 @@ def __init__(self, config: Config, input_dat: Dat, node: dict[str, Any]) -> None
197197
self.languages_title = tuple(sorted(set(self.languages_title_str.split(','))))
198198

199199
self.regions_str: str = TitleTools.regions(self.full_name, config, 'get')
200-
self.regions = tuple([region for region in config.region_order_default if region in self.regions_str])
200+
201+
# Reweight larger regions when considering multi-region titles
202+
larger_regions: list[str] = ['USA', 'Europe', 'Japan', 'Asia']
203+
reweighted_regions: list[str] = larger_regions + [region for region in config.region_order_default if region not in larger_regions]
204+
205+
self.regions = tuple([region for region in reweighted_regions if region in self.regions_str])
201206

202207
if not self.regions:
203208
self.regions = ('Unknown',)
@@ -889,7 +894,7 @@ def process_dat(dat_file: str, input_type: str, gui_input: UserInput, config: Co
889894
printwrap(
890895
f'{Font.warning_bold}* Warning: {Font.warning}DAT file doesn\'t '
891896
'comply with the Logiqx DTD standard. This might have unexpected results.', 'error')
892-
printwrap(f' DTD violation: {dtd.error_log.last_error}.' # type: ignore[attr-defined]
897+
printwrap(f' DTD violation: {dtd.error_log.last_error}.'
893898
f'{next_status}{Font.end}', 'error')
894899
eprint('')
895900
if input_type == 'file':
@@ -984,7 +989,7 @@ def header_details(key: str) -> None:
984989
input_dat.numbered = True
985990

986991
for game in root.findall('game'):
987-
if not re.search('^([0-9]|x|z)([0-9]|B)[0-9]{2,2} - ', game.attrib['name']): # type: ignore
992+
if not re.search('^([0-9]|x|z)([0-9]|B)[0-9]{2,2} - ', game.attrib['name']):
988993
input_dat.numbered = False
989994

990995
if not input_dat.numbered:
@@ -1024,17 +1029,17 @@ def header_details(key: str) -> None:
10241029
list(map(lambda d: node_dict.update({d.tag: d.text}), list(game)))
10251030

10261031
# Get multiple categories if the input DAT supports them
1027-
for category in game.xpath('category'): # type: ignore[union-attr]
1028-
categories.append(str(category.text)) #type: ignore[union-attr]
1032+
for category in game.xpath('category'):
1033+
categories.append(str(category.text))
10291034

10301035
if categories:
10311036
node_dict['category'] = categories
10321037
else:
10331038
node_dict['category'] = []
10341039

10351040
# Get the rom node attributes
1036-
for rom in game.xpath('rom'): # type: ignore[union-attr]
1037-
roms.append(dict(rom.attrib)) # type: ignore[union-attr, arg-type]
1041+
for rom in game.xpath('rom'):
1042+
roms.append(dict(rom.attrib))
10381043

10391044
# Check for at least a size and one hash in the rom node
10401045
skip_node: bool = False

0 commit comments

Comments
 (0)