-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bugfix/misc changelog fixes #154
base: develop
Are you sure you want to change the base?
Changes from all commits
cc96b35
6f138a8
bb886e1
4084509
b9f82d8
6c3f0cb
a0624cd
429c1ed
02740a6
507cc50
c5e7100
3e17402
013e27a
88db625
0e0cebb
9f8e3da
12c90c9
c973a79
05bebea
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,17 @@ | ||
[ HeroLab Holliday ] | ||
[ Holliday ] | ||
- Hero Added to Hero Labs | ||
|
||
[ HeroLab Calico ] | ||
[ Calico ] | ||
- Hero Added to Hero Labs | ||
|
||
[ HeroLab Wrecker ] | ||
[ Wrecker ] | ||
- Hero Added to Hero Labs | ||
|
||
[ HeroLab Fathom ] | ||
[ Fathom ] | ||
- Hero Added to Hero Labs | ||
|
||
[ HeroLab Viper ] | ||
[ Viper ] | ||
- Hero Added to Hero Labs | ||
|
||
[ HeroLab Magician ] | ||
[ Magician ] | ||
- Hero Added to Hero Labs |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,25 @@ | ||
[ HeroLab Holliday ] | ||
[ Holliday ] | ||
- Bounce Pad: Now properly deals damage in an area on landing | ||
|
||
[ HeroLab Calico ] | ||
[ Calico ] | ||
- Gun: Decreased Reload time from 3.5 to 3 | ||
- Gun: Increased AltFire Bullet Damage from 6 to 7 | ||
- Sekhmet's Spirit: Will only pop up targets that were hit/dragged by the moving cat | ||
- Nekomata Ward: Now has a separate 'Attack Range' of 30m | ||
- Nekomata Ward: DPS spirit scaling from 0.4 to 0.3 | ||
- Nekomata Ward: Removed T2 Ability Charges Bonus and Added +30 Ability Duration Bonus | ||
|
||
[ HeroLab Fathom ] | ||
[ Fathom ] | ||
- Gun: Damage per pellet reduced from 5 to 4.5 | ||
- Scalding Spray: Updated particle to not obstruct Fathom's vision, and added a hit effect | ||
- Breach: Updated particle effects | ||
|
||
[ HeroLab Viper ] | ||
[ Viper ] | ||
- Hook Dagger has been replaced by Screwjab Dagger | ||
- Lethal Venom: Improve VFX | ||
- Slither: Change T1 upgrade to be +25% Slide distance, T2 to be +2 Stamina, and T3 to be +30% Bullet/Spirit Resistance. | ||
- Petrify: Improve VFX, SFX, and Camera Controls when Petrified | ||
- Petrify: Can no longer be cast mid-air | ||
|
||
[ HeroLab Magician ] | ||
[ Magician ] | ||
- Gun: Now properly has damage fall-off |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
[ HeroLab Fathom ] | ||
[ Fathom ] | ||
- Health per boon reduced from 41 to 36 | ||
- Shotgun falloff start reduced from 18m to 16m | ||
- Fathom's Bloodletting updated to have the same values as the latest version of Shiv's Bloodletting |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
[ HeroLab Trapper ] | ||
[ Trapper ] | ||
- Bottled Phantasmicide: Change growth calculation to be a fixed radius increase per second, scaling with ability range | ||
- Silktrap: Fixed an issue where the trap would sometimes fail to spawn | ||
- Silktrap: T3 Upgrade now Silences for 2.5s, rather than Disarm for 4s |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
[ HeroLab Viper ] | ||
[ Viper ] | ||
- Gun: Reduce damage from 11 to 9 | ||
- Gun: Increase clip size from 18 to 24 | ||
- Reduce health per boon from 35 to 30 |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,17 @@ | ||
[ HeroLab Wrecker ] | ||
[ Wrecker ] | ||
- Wrecking Ball: Rework ability behavior | ||
- Overload: Increased camera zoom out | ||
- Overload: Now includes movespeed slow in the description and UI | ||
|
||
[ HeroLab Trapper ] | ||
[ Trapper ] | ||
- Bottled Phantasmicide: Increase initial radius from 3m to 4.5m | ||
|
||
[ HeroLab Fathom ] | ||
[ Fathom ] | ||
- Scalding Spray: Updated particles | ||
- Lurker's Ambush: The active's projectile now has a 2.5m radius | ||
|
||
[ HeroLab Viper ] | ||
[ Viper ] | ||
- Increase model size by +15% | ||
|
||
[ HeroLab Raven ] | ||
[ Raven ] | ||
- Hero Added to Hero Labs |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -151,10 +151,10 @@ def get_gamefile_changelogs(self): | |
# Citadel_PatchNotes_HeroLabs_hero_astro_1 -> | ||
# hero_astro -> | ||
# Holliday -> | ||
# [ HeroLab Holliday ] | ||
# [ Holliday ] | ||
hero_key = key.split('Citadel_PatchNotes_HeroLabs_')[1][:-2] | ||
hero_name_en = self._localize(hero_key) | ||
header = f'[ HeroLab {hero_name_en} ]' | ||
header = f'[ {hero_name_en} ]' | ||
|
||
# Initialize the changelog entry if its the first line for this hero's patch (version) | ||
if raw_changelog_id not in gamefile_changelogs: | ||
|
@@ -182,12 +182,16 @@ def get_gamefile_changelogs(self): | |
gamefile_changelogs[raw_changelog_id] += f'- {description}\n' | ||
|
||
# Add the config entry if it doesn't exist | ||
sequence_id = 0 | ||
is_hero_lab = True | ||
if raw_changelog_id not in self.changelog_configs: | ||
self.changelog_configs[raw_changelog_id] = { | ||
'forum_id': None, | ||
'date': date, | ||
'sequence_id': sequence_id, | ||
'frontfacing_date_id': frontfacing_date_id(date, sequence_id, is_hero_lab), | ||
'link': None, | ||
'is_hero_lab': True, | ||
'is_hero_lab': is_hero_lab, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
} | ||
self.changelogs.update(gamefile_changelogs) | ||
|
||
|
@@ -264,13 +268,17 @@ def fetch_forum_changelogs(self): | |
except Exception: | ||
logger.error(f'Issue with parsing RSS feed item {entry.link}') | ||
|
||
changelog_id = self._create_changelog_id(date, version) | ||
sequence_id = self._create_sequence_id(date, version) | ||
is_hero_lab = False | ||
changelog_id = date if sequence_id == 0 else f'{date}-{sequence_id}' | ||
self.changelogs[changelog_id] = full_text | ||
self.changelog_configs[changelog_id] = { | ||
'forum_id': version, | ||
'date': date, | ||
'sequence_id': sequence_id, | ||
'frontfacing_date_id': frontfacing_date_id(date, sequence_id, is_hero_lab), | ||
'link': entry.link, | ||
'is_hero_lab': False, | ||
'is_hero_lab': is_hero_lab, | ||
Comment on lines
+278
to
+281
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. with changes to the shape of the config, we also need to change the type definition. Ideally this should throw an error on runtime? But I'm not that experienced with python types |
||
} | ||
|
||
if skip_num > 0: | ||
|
@@ -293,7 +301,7 @@ def _process_local_changelogs(self, changelog_path): | |
except Exception: | ||
logger.warning(f'Issue with {file}, skipping') | ||
|
||
def _create_changelog_id(self, date, forum_id, i=0): | ||
def _create_sequence_id(self, date, forum_id, i=0): | ||
""" | ||
Creating a custom id based on the date by appending _<i> | ||
if its another patch for the same day, i.e.: | ||
|
@@ -311,17 +319,17 @@ def _create_changelog_id(self, date, forum_id, i=0): | |
|
||
# If this id doesn't yet exist, use it | ||
if existing_config is None: | ||
return id | ||
return i | ||
# Else same date already exists | ||
|
||
# If the forum id is the same, use the same changelog id | ||
# which will update the existing record | ||
if existing_config['forum_id'] == forum_id: | ||
return id | ||
return i | ||
# Else forum id's are different, so different patches on the same day | ||
|
||
# Recursively check if the next id is available | ||
return self._create_changelog_id(date, forum_id, i + 1) | ||
return self._create_sequence_id(date, forum_id, i + 1) | ||
|
||
|
||
def format_date(date): | ||
|
@@ -345,3 +353,19 @@ def format_date(date): | |
# Reformat to yyyy-mm-dd | ||
date = f'{date[2]}-{date[0]}-{date[1]}' | ||
return date | ||
|
||
def frontfacing_date_id(date, sequence_id, is_hero_lab): | ||
""" | ||
Reformat yyyy-mm-dd to May 10, 2024 | ||
""" | ||
date = date.split('-') | ||
month = int(date[1]) | ||
day = int(date[2]) | ||
year = date[0] | ||
month_name = [ | ||
'January', 'February', 'March', 'April', 'May', 'June', 'July', | ||
'August', 'September', 'October', 'November', 'December' | ||
] | ||
sequence_str = '' if sequence_id == 0 else f'-{sequence_id}' | ||
herolab_str = ' HeroLab' if is_hero_lab else '' | ||
return f'{month_name[month - 1]} {day}, {year}{sequence_str}{herolab_str}' |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -32,7 +32,7 @@ def run(self, version, logs): | |
changelog_out = [] | ||
|
||
for line in changelog_lines: | ||
if line is None or line == '': | ||
if line is None or line == '==': | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I thought the changelog json files were to just cover specific changelog pages, such as for individual Heroes, Items etc. I think trying to have it also handle full patch notes is going to become difficult. We are probably better off leaving those pages to be manual, as they also use extra bits of formatting, such as headings, nested bullets, etc. |
||
continue | ||
|
||
# parse heading: if heading is found, update current heading | ||
|
@@ -52,7 +52,10 @@ def run(self, version, logs): | |
# replace -> with → | ||
line = line.replace('->', '→') | ||
|
||
tags = self._parse_tags(current_heading, line) | ||
if line != '': | ||
tags = self._parse_tags(current_heading, line) | ||
else: | ||
tags = [self.default_tag] | ||
|
||
changelog_out.append({'Description': line, 'Tags': tags}) | ||
|
||
|
@@ -117,12 +120,7 @@ def _parse_tags(self, current_heading, line): | |
if heading_tag is not None: | ||
tags = self._register_tag(tags, tag=heading_tag) | ||
|
||
# If the heading is a "HeroLab <hero>", register <hero> as well | ||
if current_heading.startswith('HeroLab '): | ||
hero = current_heading[len('HeroLab ') :] | ||
if self.is_hero(hero): | ||
tags = self._register_tag(tags, hero) | ||
tags = self._register_tag(tags, 'Hero') | ||
|
||
|
||
# if no tag is found, assign to default tag | ||
if len(tags) == 0: | ||
|
@@ -216,6 +214,9 @@ def _embed_icons(self, changelog): | |
# {{PageRef|tag|alt_name=remappable_text}} | ||
for remappable_text in self.tags.remap: | ||
tag = self.tags.remap[remappable_text] | ||
if tag == self.default_tag: # skip default tag | ||
continue | ||
|
||
if remappable_text in remaining_description and tag in tags: | ||
icon = '{{' + template + '|' + tag + '|alt_name=' + remappable_text + '}}' | ||
description = description.replace(remappable_text, icon) | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think
label
is a simpler name for this