mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2024-11-10 01:33:54 +01:00
Character,Factions has a badge indicating how many pending invite the player has, Character,Augmentations has a badge indicating how many augs the player has bought but not installed.
This commit is contained in:
parent
6ca7f10faf
commit
5106315128
@ -80,6 +80,28 @@ a:visited {
|
||||
right: 0;
|
||||
}
|
||||
|
||||
#factions-tab {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
#factions-notification {
|
||||
font-size: $defaultFontSize * 0.625;
|
||||
position: absolute; /* Position the badge within the relatively positioned button */
|
||||
top: 0;
|
||||
right: 0;
|
||||
}
|
||||
|
||||
#augmentations-tab {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
#augmentations-notification {
|
||||
font-size: $defaultFontSize * 0.625;
|
||||
position: absolute; /* Position the badge within the relatively positioned button */
|
||||
top: 0;
|
||||
right: 0;
|
||||
}
|
||||
|
||||
.notification-on {
|
||||
background-color: #fa3e3e;
|
||||
color: #fff;
|
||||
|
@ -245,6 +245,11 @@ export let CONSTANTS: IMap<any> = {
|
||||
* New '.ns' scripts start with a main function.
|
||||
* hacknet.maxNumNodes returns the maximum number of hacknet nodes.
|
||||
|
||||
Bladeburner
|
||||
* Current stamina will scale as max stamina increases, this prevents players
|
||||
from having very high penalty when they gain huge amount of exp at the
|
||||
start of a reset.
|
||||
|
||||
Misc.
|
||||
* Fixed an issue where SF3 was listed as infinitly repeatable and SF12 as
|
||||
having a limit of 3.
|
||||
|
@ -774,6 +774,7 @@ const Engine = {
|
||||
updateDisplaysLong: 15,
|
||||
updateActiveScriptsDisplay: 5,
|
||||
createProgramNotifications: 10,
|
||||
augmentationsNotifications: 10,
|
||||
checkFactionInvitations: 100,
|
||||
passiveFactionGrowth: 600,
|
||||
messages: 150,
|
||||
@ -868,6 +869,19 @@ const Engine = {
|
||||
Engine.Counters.createProgramNotifications = 10;
|
||||
}
|
||||
|
||||
if (Engine.Counters.augmentationsNotifications <= 0) {
|
||||
var num = Player.queuedAugmentations.length;
|
||||
var elem = document.getElementById("augmentations-notification");
|
||||
if (num > 0) {
|
||||
elem.innerHTML = num;
|
||||
elem.setAttribute("class", "notification-on");
|
||||
} else {
|
||||
elem.innerHTML = "";
|
||||
elem.setAttribute("class", "notification-off");
|
||||
}
|
||||
Engine.Counters.augmentationsNotifications = 10;
|
||||
}
|
||||
|
||||
if (Engine.Counters.checkFactionInvitations <= 0) {
|
||||
var invitedFactions = Player.checkForFactionInvitations();
|
||||
if (invitedFactions.length > 0) {
|
||||
@ -881,6 +895,17 @@ const Engine = {
|
||||
var randFaction = invitedFactions[Math.floor(Math.random() * invitedFactions.length)];
|
||||
inviteToFaction(randFaction);
|
||||
}
|
||||
|
||||
const num = Player.factionInvitations.length;
|
||||
const elem = document.getElementById("factions-notification");
|
||||
if (num > 0) {
|
||||
elem.innerHTML = num;
|
||||
elem.setAttribute("class", "notification-on");
|
||||
} else {
|
||||
elem.innerHTML = "";
|
||||
elem.setAttribute("class", "notification-off");
|
||||
}
|
||||
|
||||
Engine.Counters.checkFactionInvitations = 100;
|
||||
}
|
||||
|
||||
|
@ -60,9 +60,11 @@ if (htmlWebpackPlugin.options.googleAnalytics.trackingId) { %>
|
||||
</li>
|
||||
<li id="factions-tab" class="mainmenu-accordion-panel">
|
||||
<button id="factions-menu-link"> Factions </button>
|
||||
<span id="factions-notification" class="notification-off"> </span>
|
||||
</li>
|
||||
<li id="augmentations-tab" class="mainmenu-accordion-panel">
|
||||
<button id="augmentations-menu-link" style="overflow: hidden; text-overflow: ellipsis; white-space: nowrap;"> Augmentations </button>
|
||||
<span id="augmentations-notification" class="notification-off"> </span>
|
||||
</li>
|
||||
<li id="hacknet-nodes-tab" class="mainmenu-accordion-panel">
|
||||
<button id="hacknet-nodes-menu-link"> Hacknet Nodes </button>
|
||||
|
Loading…
Reference in New Issue
Block a user