Skip to content

Commit

Permalink
slightly fix weapon variants
Browse files Browse the repository at this point in the history
  • Loading branch information
ZingBallyhoo committed Dec 13, 2023
1 parent c45cced commit 6c81232
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
3 changes: 2 additions & 1 deletion DataTool/DataModels/Unlock.cs
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,8 @@ private void Init(STU_3021DDED unlock, ulong key) {
Type == UnlockType.VictoryPose || Type == UnlockType.VoiceLine ||
Type == UnlockType.Emote || Type == UnlockType.Souvenir ||
Type == UnlockType.NameCard || Type == UnlockType.PlayerTitle ||
Type == UnlockType.WeaponCharm || Type == UnlockType.WeaponSkin;
Type == UnlockType.WeaponCharm || Type == UnlockType.WeaponSkin ||
Type == UnlockType.WeaponVariant;

if (unlock.m_BEE9BCDA != null) {
Categories = unlock.m_BEE9BCDA
Expand Down
2 changes: 1 addition & 1 deletion DataTool/SaveLogic/Unlock/SkinTheme.cs
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ private static void SetPreviewWeaponNames(FindLogic.Combo.ComboInfo info, Dictio
/// Pass these replacements into Combo.Find to make sure you're getting the right files for a specific skin theme.
/// </summary>
public static Dictionary<ulong, ulong> GetReplacements(STU_21276722 skin) {
if (skin == null) return null;
if (skin == null) return new Dictionary<ulong, ulong>();

var replacements = new Dictionary<ulong, ulong>();
if (skin.m_runtimeOverrides != null) {
Expand Down
5 changes: 5 additions & 0 deletions DataTool/ToolLogic/Extract/ExtractHeroUnlocks.cs
Original file line number Diff line number Diff line change
Expand Up @@ -336,6 +336,11 @@ public static void SaveUnlock(
}

if (ShouldDo(unlock, config, tags, UnlockType.WeaponVariant)) {
if (unlock.STU.m_rarity == STUUnlockRarity.Common) {
Logger.Debug("ExtractHeroUnlock", $"skipping common rarity weapon {unlock.Name}");
return;
}

LoudLog($"\tExtracting weapon variant {unlock.Name}");
WeaponVariant.Save(flags, thisPath, unlock, hero);
}
Expand Down

0 comments on commit 6c81232

Please sign in to comment.