Merge EndzE achievement fix

https://github.com/Detanup01/gbe_fork_tools/issues/9#issuecomment-3795927921
This commit is contained in:
M4RCK5
2026-01-30 20:09:51 -03:00
committed by GitHub
parent 8cd743eb51
commit ee4a8c77f9

View File

@@ -24,7 +24,7 @@ def generate_stats_achievements(
stat_info = sch['stats'] stat_info = sch['stats']
for s in stat_info: for s in stat_info:
stat = stat_info[s] stat = stat_info[s]
if stat['type'] == STAT_TYPE_BITS: if stat['type'] == STAT_TYPE_BITS or stat['type'] == 'ACHIEVEMENTS':
achs = stat['bits'] achs = stat['bits']
for ach_num in achs: for ach_num in achs:
out = {} out = {}
@@ -54,11 +54,11 @@ def generate_stats_achievements(
out['name'] = stat['name'] out['name'] = stat['name']
if 'min' in stat: if 'min' in stat:
out['min'] = stat['min'] out['min'] = stat['min']
if stat['type'] == STAT_TYPE_INT: if stat['type'] == STAT_TYPE_INT or stat['type'] == 'INT':
out['type'] = 'int' out['type'] = 'int'
elif stat['type'] == STAT_TYPE_FLOAT: elif stat['type'] == STAT_TYPE_FLOAT or stat['type'] == 'FLOAT':
out['type'] = 'float' out['type'] = 'float'
elif stat['type'] == STAT_TYPE_AVGRATE: elif stat['type'] == STAT_TYPE_AVGRATE or stat['type'] == 'AVGRATE':
out['type'] = 'avgrate' out['type'] = 'avgrate'
if 'Default' in stat: if 'Default' in stat:
out['default'] = stat['Default'] out['default'] = stat['Default']