Skip to content

Commit ee9e30c

Browse files
committed
Biome & Build Fix
1 parent 75b6686 commit ee9e30c

File tree

3 files changed

+6
-3
lines changed

3 files changed

+6
-3
lines changed

fission/src/mirabuf/ProtectedZoneSceneObject.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -283,7 +283,7 @@ class ProtectedZoneSceneObject extends SceneObject {
283283
}
284284
break
285285

286-
case ContactType.ALLY_ROBOT_INSIDE:
286+
case ContactType.ALLY_ROBOT_INSIDE: {
287287
// Penalize opposing robot if an ally robot is inside when collision occurs
288288
const allyRobot = [collisionObjectBody1, collisionObjectBody2].find(
289289
robot => robot.alliance === this._prefs?.alliance
@@ -293,6 +293,7 @@ class ProtectedZoneSceneObject extends SceneObject {
293293
robotToPenalize = opposingRobot
294294
}
295295
break
296+
}
296297
}
297298

298299
if (shouldPenalize && robotToPenalize) {

fission/src/test/PreferencesSystem.test.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import {
77
} from "@/systems/preferences/PreferenceTypes"
88
import { MatchModeType } from "@/systems/MatchMode"
99
import { test, describe, expect } from "vitest"
10+
import { ContactType } from "@/mirabuf/ProtectedZoneSceneObject"
1011

1112
describe("Preferences System Global Values", () => {
1213
test("Setting values", () => {
@@ -201,7 +202,7 @@ describe("Preference System Robot/Field", () => {
201202
parentNode: undefined,
202203
deltaTransformation: [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1],
203204
penaltyPoints: 2,
204-
requireRobotContact: false,
205+
contactType: ContactType.ROBOT_ENTERS,
205206
activeDuring: [MatchModeType.AUTONOMOUS, MatchModeType.TELEOP],
206207
},
207208
],

fission/src/test/mirabuf/ProtectedZoneSceneObject.test.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import { createBodyMock } from "../mocks/jolt"
66
import { MatchModeType } from "@/systems/MatchMode"
77
import { MiraType } from "@/mirabuf/MirabufLoader"
88
import SimulationSystem from "@/systems/simulation/SimulationSystem"
9+
import { ProtectedZonePreferences } from "@/systems/preferences/PreferenceTypes"
910

1011
const mockPhysicsSystem = {
1112
createSensor: vi.fn(),
@@ -76,7 +77,7 @@ describe("ProtectedZoneSceneObject", () => {
7677
GetIndexAndSequenceNumber: () => id,
7778
}) as unknown as Jolt.BodyID
7879

79-
const createProtectedZoneInstance = (prefs: any) => {
80+
const createProtectedZoneInstance = (prefs: Partial<ProtectedZonePreferences>) => {
8081
const instance = new ProtectedZoneSceneObject({} as unknown as MirabufSceneObject, 0)
8182
Reflect.set(instance, "_prefs", {
8283
activeDuring: [MatchModeType.TELEOP],

0 commit comments

Comments
 (0)