mirror of
https://github.com/openfrontio/OpenFrontIO.git
synced 2026-06-21 09:30:45 +00:00
Little Console Cleanup 🧹 (#3741)
## Description: Fixes these console warnings from bots: <img width="591" height="94" alt="Screenshot 2026-04-19 033624" src="https://github.com/user-attachments/assets/6ee79302-e2a7-4195-94e5-c1f455eb1799" /> Removes some spammy logs, they dont seem to be helpful? <img width="271" height="174" alt="Screenshot 2026-04-19 033739" src="https://github.com/user-attachments/assets/70122506-e8fb-4a72-b73e-08e72fe222bd" /> <img width="284" height="656" alt="Screenshot 2026-04-19 033646" src="https://github.com/user-attachments/assets/4b4ebef2-e191-4947-9615-0e26cd9bf075" /> ## Please complete the following: - [X] I have added screenshots for all UI updates - [X] I process any text displayed to the user through translateText() and I've added it to the en.json file - [X] I have added relevant tests to the test directory - [X] I confirm I have thoroughly tested these changes and take full responsibility for any bugs introduced ## Please put your Discord username so you can be contacted if a bug or regression is found: FloPinguin
This commit is contained in:
@@ -106,7 +106,6 @@ export function computeDirection(
|
||||
if (dx1 === 1 && dx2 === 0 && dy2 === 1) return RailType.BOTTOM_LEFT;
|
||||
if (dx1 === -1 && dx2 === 0 && dy2 === 1) return RailType.BOTTOM_RIGHT;
|
||||
}
|
||||
console.warn(`Invalid rail segment: ${dx1}:${dy1}, ${dx2}:${dy2}`);
|
||||
return RailType.VERTICAL;
|
||||
}
|
||||
|
||||
|
||||
@@ -229,7 +229,6 @@ export class NukeExecution implements Execution {
|
||||
|
||||
// make the nuke unactive if it was intercepted
|
||||
if (!this.nuke.isActive()) {
|
||||
console.log(`Nuke destroyed before reaching target`);
|
||||
this.active = false;
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -304,9 +304,6 @@ export class SAMLauncherExecution implements Execution {
|
||||
let target: Target | null = null;
|
||||
if (mirvWarheadTargets.length === 0) {
|
||||
target = this.targetingSystem.getSingleTarget(ticks);
|
||||
if (target !== null) {
|
||||
console.log("Target acquired");
|
||||
}
|
||||
}
|
||||
|
||||
// target is already filtered to exclude nukes targeted by other SAMs
|
||||
|
||||
@@ -379,8 +379,10 @@ export class AiAttackBehavior {
|
||||
}
|
||||
|
||||
findIncomingAttackPlayer(): Player | null {
|
||||
let incomingAttacks = this.player
|
||||
.incomingAttacks()
|
||||
.filter((attack) => !this.player.isFriendly(attack.attacker()));
|
||||
// Ignore bot attacks if we are not a bot.
|
||||
let incomingAttacks = this.player.incomingAttacks();
|
||||
if (this.player.type() !== PlayerType.Bot) {
|
||||
incomingAttacks = incomingAttacks.filter(
|
||||
(attack) => attack.attacker().type() !== PlayerType.Bot,
|
||||
|
||||
Reference in New Issue
Block a user