mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2024-11-29 19:13:49 +01:00
Fixed bug with faction invitations not getting deleted
This commit is contained in:
parent
68eb68a89e
commit
62e2f0582a
@ -56,6 +56,15 @@ export function joinFaction(faction) {
|
||||
Factions[enemy].isBanned = true;
|
||||
}
|
||||
}
|
||||
for (var i = 0; i < Player.factionInvitations.length; ++i) {
|
||||
if (Player.factionInvitations[i] == faction.name || Factions[Player.factionInvitations[i]].isBanned) {
|
||||
Player.factionInvitations.splice(i, 1);
|
||||
i--;
|
||||
}
|
||||
}
|
||||
if (routing.isOn(Page.Factions)) {
|
||||
Engine.loadFactionsContent();
|
||||
}
|
||||
}
|
||||
|
||||
export function startHackingMission(faction) {
|
||||
|
@ -643,12 +643,6 @@ const Engine = {
|
||||
clickListener: (e) => {
|
||||
if (!e.isTrusted) { return false; }
|
||||
joinFaction(Factions[factionName]);
|
||||
for (var i = 0; i < Player.factionInvitations.length; ++i) {
|
||||
if (Player.factionInvitations[i] == factionName || Factions[Player.factionInvitations[i]].isBanned) {
|
||||
Player.factionInvitations.splice(i, 1);
|
||||
i--;
|
||||
}
|
||||
}
|
||||
Engine.displayFactionsInfo();
|
||||
return false;
|
||||
},
|
||||
|
@ -36,8 +36,6 @@ function factionInvitationBoxCreate(faction) {
|
||||
var i = Player.factionInvitations.findIndex((facName)=>{return facName === faction.name});
|
||||
if (i === -1) {
|
||||
console.error("Could not find faction in Player.factionInvitations");
|
||||
} else {
|
||||
Player.factionInvitations.splice(i, 1);
|
||||
}
|
||||
joinFaction(faction);
|
||||
factionInvitationBoxClose();
|
||||
|
Loading…
Reference in New Issue
Block a user