Skip to content

Commit

Permalink
Update 0.17 (Files)
Browse files Browse the repository at this point in the history
  • Loading branch information
1nf1n1t3Sm4sh3r committed Nov 8, 2024
1 parent 0bb2783 commit 9168973
Show file tree
Hide file tree
Showing 6 changed files with 38 additions and 27 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -230,10 +230,10 @@ There's a new link added to the footer on the home screen, which opens a changel
| Badge Name | Description | Tier Requirements |
| -------------------- | ------------------------------------------ |------------------ |
| Eggstra Spender | $ Worth of Premium Items Owned | <table><thead><tr><th>Tier</th><th>Requirement</th></tr></thead><tbody><tr><td>I</td><td>$50</td></tr><tr><td>II</td><td>$100</td></tr><tr><td>III</td><td>$150</td></tr><tr><td>IV</td><td>$200</td></tr><tr><td>V</td><td>$250+</td></tr></tbody></table>|
| Eggstra Spender | $ Worth of Premium Items Owned | <table><thead><tr><th>Tier</th><th>Requirement</th></tr></thead><tbody><tr><td>I</td><td>$50</td></tr><tr><td>II</td><td>$100</td></tr><tr><td>III</td><td>$150</td></tr><tr><td>IV</td><td>$250</td></tr><tr><td>V</td><td>$500+</td></tr></tbody></table>|
| Challenge Eggcepted | # of Unique Challenges Completed | <table><thead><tr><th>Tier</th><th>Requirement</th></tr></thead><tbody><tr><td>I</td><td>10</td></tr><tr><td>II</td><td>25</td></tr><tr><td>III</td><td>50</td></tr><tr><td>IV</td><td>75</td></tr><tr><td>V</td><td>100+</td></tr></tbody></table>|
| Overeggchiever | # of Total Challenges Completed | <table><thead><tr><th>Tier</th><th>Requirement</th></tr></thead><tbody><tr><td>I</td><td>50</td></tr><tr><td>II</td><td>100</td></tr><tr><td>III</td><td>250</td></tr><tr><td>IV</td><td>500</td></tr><tr><td>V</td><td>1,000+</td></tr></tbody></table>|
| Eggspenditure | Golden Eggs Spent | <table><thead><tr><th>Tier</th><th>Requirement</th></tr></thead><tbody><tr><td>I</td><td>250,000</td></tr><tr><td>II</td><td>500,000</td></tr><tr><td>III</td><td>1,000,000</td></tr><tr><td>IV</td><td>2,500,000</td></tr><tr><td>V</td><td>5,000,000+</td></tr></tbody></table>|
| Eggspenditure | Golden Eggs Spent | <table><thead><tr><th>Tier</th><th>Requirement</th></tr></thead><tbody><tr><td>I</td><td>500,000</td></tr><tr><td>II</td><td>1,000,000</td></tr><tr><td>III</td><td>2,500,000</td></tr><tr><td>IV</td><td>5,000,000</td></tr><tr><td>V</td><td>7,500,000+</td></tr></tbody></table>|
| Shell Scrambler | Lifetime Kills | <table><thead><tr><th>Tier</th><th>Requirement</th></tr></thead><tbody><tr><td>I</td><td>10,000</td></tr><tr><td>II</td><td>25,000</td></tr><tr><td>III</td><td>50,000</td></tr><tr><td>IV</td><td>100,000</td></tr><tr><td>V</td><td>200,000+</td></tr></tbody></table>|
| Master of Arms | Lifetime Kills With Every Weapon | <table><thead><tr><th>Tier</th><th>Requirement</th></tr></thead><tbody><tr><td>I</td><td>250</td></tr><tr><td>II</td><td>500</td></tr><tr><td>III</td><td>750</td></tr><tr><td>IV</td><td>1,000</td></tr><tr><td>V</td><td>2,500+</td></tr></tbody></table>|
| Eggsecutioner | Lifetime Kills in Every Game Mode | <table><thead><tr><th>Tier</th><th>Requirement</th></tr></thead><tbody><tr><td>I</td><td>500</td></tr><tr><td>II</td><td>1,000</td></tr><tr><td>III</td><td>5,000</td></tr><tr><td>IV</td><td>10,000</td></tr><tr><td>V</td><td>20,000+</td></tr></tbody></table>|
Expand Down
17 changes: 14 additions & 3 deletions data/changelog.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,18 @@
{
"current": [
{
"version": "0.17",
"date": "November 8 2024",
"content": [
"Shell now automatically reloads after you update The MegaMod!",
"Fixed tier badge level up alert showing when badges level down",
"Fixed stamps not being sorted correctly in the inventory",
"Buffed tier requirements for \"Eggstra Spender\" Badge",
"Buffed tier requirements for \"Eggspenditure\" Badge"
]
}
],
"old": [
{
"version": "0.16",
"date": "November 2 2024",
Expand All @@ -15,9 +28,7 @@
"Tier badges now show a notification when they level up!",
"Added the Gus theme and matching Gus skybox!"
]
}
],
"old": [
},
{
"version": "0.15",
"date": "October 18 2024",
Expand Down
15 changes: 5 additions & 10 deletions data/info.json
Original file line number Diff line number Diff line change
@@ -1,15 +1,10 @@
{
"announcement": "<b>October 16th, 2024</b> <br><br>Attention All Playtesters!<br>Welcome to The MegaMod playtest!<br>Explore all the mods and have fun :)<br><br>-Infinite",
"updateInfo": [
"Fixed grenade pickups not updating in first-person spectate mode",
"Fixed \"killstreak\" typo - thanks Godric!",
"Fixed egg premium items not being grouped with premiums",
"Optimized some setting saving logic",
"Tweaked color of \"Very Good Wizard\" Badge to match BWD Blue",
"Refined requirement for \"Treasure Hunter\" Badge to include account age",
"Buffed tier requirements for \"Royal Rooster\" Badge",
"Buffed tier requirements for \"Coop King\" Badge",
"Tier badges now show a notification when they level up!",
"Added the Gus theme and matching Gus skybox!"
"Shell now automatically reloads after you update The MegaMod!",
"Fixed tier badge level up alert showing when badges level down",
"Fixed stamps not being sorted correctly in the inventory",
"Buffed tier requirements for \"Eggstra Spender\" Badge",
"Buffed tier requirements for \"Eggspenditure\" Badge"
]
}
2 changes: 1 addition & 1 deletion data/loc.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"megaMod_modErrsPopup_desc": "There was an error while starting The MegaMod!<br>Certain mods may not show up or work correctly.<h3>Affected Mods:</h3>{0}",

"megaMod_updatePopup_title": "Update Available!",
"megaMod_updatePopup_desc": "<br>A new version of The MegaMod is available!<br><br>Please click \"Gimme Update!\" to install version {0} so that you don't miss out on the latest features and bugfixes!<br><br>Continuing to use this (outdated) version may lead to Shell Shockers or The MegaMod not working properly!",
"megaMod_updatePopup_desc": "<br>A new version of The MegaMod is available!<br><br>Please click the \"Gimme Update!\" button to install version {0} so that you don't miss out on the latest features and bugfixes!<br><br>Continuing to use this (outdated) version may lead to Shell Shockers or The MegaMod not working properly!<br><br>This Shell Shockers tab will reload after you install the update and return to this tab.",
"megaMod_updatePopup_cancelBtn": "Nah :(",
"megaMod_updatePopup_okBtn": "Gimme Update!",
"megaMod_updatedPopup_title": "Update Installed!",
Expand Down
23 changes: 14 additions & 9 deletions js/megaMod.js
Original file line number Diff line number Diff line change
Expand Up @@ -552,17 +552,19 @@ class MegaMod {
const newTierBadges = getTierBadges(newBadges.rows);
const oldTierBadges = getTierBadges(this.badges.rows);

const getBadgeClass = badge => badge.styleClass.replace(` tier${badge.tier}`, "");
const oldBadgeDict = oldTierBadges.reduce((dict, badge) => {
dict[badge.title] = badge.tier;
dict[getBadgeClass(badge)] = badge.tier;
return dict;
}, {});

const removeHoverClass = style => style.replace(/\bbadge-hover(-alt)?\b/g, '');
newTierBadges.forEach(newBadge => {
const oldTier = oldBadgeDict[newBadge.title];
const oldTier = oldBadgeDict[getBadgeClass(newBadge)];
if (oldTier === undefined || newBadge.tier > oldTier) {
vueApp.addBadgeMsg({
badgeClass: newBadge.styleClass.replace(/\bbadge-hover(-alt)?\b/g, ''),
iconClass: newBadge.classList.replace(/\bbadge-hover(-alt)?\b/g, ''),
badgeClass: removeHoverClass(newBadge.styleClass),
iconClass: removeHoverClass(newBadge.classList),
badgeName: newBadge.title
});
}
Expand All @@ -589,6 +591,9 @@ class MegaMod {
openMegaModUpdate() {
BAWK.play("ui_click");
window.open(`${cdnPath}/js/script.user.js`);
document.addEventListener("visibilitychange", () => {
if (document.visibilityState === "visible") window.location.reload();
});
}
});

Expand Down Expand Up @@ -2309,11 +2314,11 @@ class BetterUI {
// Nice and ez checks, W devs.
return item.unlock === theme;
case "eggpremium":
return this.isThemedItem(item, "purchase") && item?.item_data?.tags?.some(t => t.toLowerCase() === 'premium') && item.price > 15000;
return this.isThemedItem(item, "purchase") && (item?.item_data?.tags?.some(t => t.toLowerCase() === 'premium') ?? false) && item.price > 15000;
case "legacy":
return this.isThemedItem(item, "default") && item?.item_data?.meshName?.includes("_Legacy");
case "limited":
return item?.item_data?.tags?.includes("Limited");;
return item?.item_data?.tags?.includes("Limited") ?? false;
case "drops":
// No native "twitch" or "drops" unlock type yet :(
return this.isThemedItem(item, "manual") && item?.item_data?.tags?.some(tag => tag.toLowerCase().includes("drops"));
Expand All @@ -2335,11 +2340,11 @@ class BetterUI {
return this.isThemedItem(item, "manual") && !(this.isThemedItem(item, "limited") || this.isThemedItem(item, "drops") || this.isThemedItem(item, "notif") || this.isThemedItem(item, "league") || this.isThemedItem(item, "yolker") || this.isThemedItem(item, "promo") || this.isThemedItem(item, "event") || this.isThemedItem(item, "social"));
case "creator":
const creatorTags = unsafeWindow.megaMod.betterUI.creatorTypes.map(type => unsafeWindow.megaMod.betterUI.tags.creator.format(type));
return item?.item_data?.tags?.some(tag => creatorTags.includes(tag));
return item?.item_data?.tags?.some(tag => creatorTags.includes(tag)) ?? false;
case "creatoryoutube":
return item?.item_data?.tags?.includes(unsafeWindow.megaMod.betterUI.tags.creator.format(unsafeWindow.megaMod.betterUI.creatorTypes[4]));
return item?.item_data?.tags?.includes(unsafeWindow.megaMod.betterUI.tags.creator.format(unsafeWindow.megaMod.betterUI.creatorTypes[4])) ?? false;
case "creatortwitch":
return item?.item_data?.tags?.includes(unsafeWindow.megaMod.betterUI.tags.creator.format(unsafeWindow.megaMod.betterUI.creatorTypes[6]));
return item?.item_data?.tags?.includes(unsafeWindow.megaMod.betterUI.tags.creator.format(unsafeWindow.megaMod.betterUI.creatorTypes[6])) ?? false;
case "shop":
return this.isThemedItem(item, "purchase") && !(this.isThemedItem(item, "creator") || this.isThemedItem(item, "limited") || this.isThemedItem(item, "event"));
}
Expand Down
4 changes: 2 additions & 2 deletions mods/data/badges.json
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@
"condition": "extern?.account?.inventory.filter(i => i?.unlock === 'premium' && i.price !== 2147483647).reduce((sum, item) => sum + item.price, 0) >= {0}",
"locKey": "megaMod_betterUI_badge_premium",
"tierIcons": ["fas fa-dollar-sign", "fas fa-money-check-alt", "fas fa-credit-card", "fas fa-sack-dollar", "fas fa-sack-dollar"],
"tierValues": [50, 100, 150, 200, 250],
"tierValues": [50, 100, 150, 250, 500],
"class": "badge-premium"
},
{
Expand All @@ -141,7 +141,7 @@
"condition": "extern?.account?.eggsSpent >= {0}",
"locKey": "megaMod_betterUI_badge_spenteggs",
"tierIcons": ["fas fa-shopping-basket", "fas fa-shopping-basket", "fas fa-shopping-basket", "fas fa-shopping-cart", "fas fa-shopping-cart"],
"tierValues": [250000, 500000, 1000000, 2500000, 5000000],
"tierValues": [500000, 100000, 250000, 5000000, 7500000],
"class": "badge-spender"
},
{
Expand Down

0 comments on commit 9168973

Please sign in to comment.