mirror of
https://github.com/openfrontio/OpenFrontIO.git
synced 2026-08-17 05:34:37 +00:00
Record MIRV warhead intercepted stats, perf improvements (#1220)
## Description: - Record MIRV warhead intercepted stats. - Refactor `nearbyUnits()` to accept a predicate, and combine related unnecessary `filter()` and `map()` calls. ## 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 - [x] I understand that submitting code with bugs that could have been caught through manual testing blocks releases and new features for all contributors --------- Co-authored-by: Scott Anderson <662325+scottanderson@users.noreply.github.com> Co-authored-by: evanpelle <evanpelle@gmail.com>
This commit is contained in:
co-authored by
Scott Anderson
evanpelle
parent
3597f7b326
commit
2dad1dc9a6
+1
-1
@@ -163,7 +163,7 @@ describe("Stats", () => {
|
||||
});
|
||||
|
||||
test("bombIntercept", () => {
|
||||
stats.bombIntercept(player1, player2, UnitType.MIRVWarhead);
|
||||
stats.bombIntercept(player1, UnitType.MIRVWarhead, 1);
|
||||
expect(stats.stats()).toStrictEqual({
|
||||
client1: { bombs: { mirvw: [0n, 0n, 1n] } },
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user