mirror of
https://github.com/openfrontio/OpenFrontIO.git
synced 2026-07-28 14:07:56 +00:00
fix alternate view perf regression (#1734)
Have the diplomacy view only draw border, not interior tiles. Drawing the interior tiles is a very expensive operation and caused main thread cpu usage to spike to close to 100%. Also change the color scheme so that neutral players are gray, and embargoed players are red. I think long term embargo should be more of a war state. Added embargo update and cleaned it up to use Player instead of PlayerID. There's no reason to pass ids around. <img width="493" height="466" alt="Screenshot 2025-08-07 at 6 25 55 PM" src="https://github.com/user-attachments/assets/75552036-42f1-4103-9537-234ff1c0464f" /> - [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 - [x] I have read and accepted the CLA agreement (only required once). regression is found: evan
This commit is contained in:
committed by
Scott Anderson
parent
e6ff3c4ce3
commit
70b7464a4b
@@ -75,7 +75,7 @@ export class AttackExecution implements Execution {
|
||||
this._owner.type() !== PlayerType.Bot
|
||||
) {
|
||||
// Don't let bots embargo since they can't trade anyway.
|
||||
targetPlayer.addEmbargo(this._owner.id(), true);
|
||||
targetPlayer.addEmbargo(this._owner, true);
|
||||
this.rejectIncomingAllianceRequests(targetPlayer);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user