Skip to content

Commit ab5fb70

Browse files
committed
Format & Build Fix
1 parent 28a49c4 commit ab5fb70

File tree

3 files changed

+28
-13
lines changed

3 files changed

+28
-13
lines changed

fission/src/mirabuf/ProtectedZoneSceneObject.ts

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -283,19 +283,15 @@ class ProtectedZoneSceneObject extends SceneObject {
283283

284284
case ContactType.RED_ROBOT_INSIDE:
285285
// Penalize if the red robot is inside the zone when collision occurs
286-
const redRobot = [collisionObjectBody1, collisionObjectBody2].find(
287-
robot => robot.alliance === "red"
288-
)
286+
const redRobot = [collisionObjectBody1, collisionObjectBody2].find(robot => robot.alliance === "red")
289287
if (redRobot && this.isRobotInside(redRobot)) {
290288
shouldPenalize = true
291289
}
292290
break
293291

294292
case ContactType.BLUE_ROBOT_INSIDE: {
295293
// Penalize if the blue robot is inside the zone when collision occurs
296-
const blueRobot = [collisionObjectBody1, collisionObjectBody2].find(
297-
robot => robot.alliance === "blue"
298-
)
294+
const blueRobot = [collisionObjectBody1, collisionObjectBody2].find(robot => robot.alliance === "blue")
299295
if (blueRobot && this.isRobotInside(blueRobot)) {
300296
shouldPenalize = true
301297
}

fission/src/systems/preferences/PreferenceTypes.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import { Vector3Tuple } from "three"
22
import { SimConfigData } from "@/ui/panels/simulation/SimConfigShared"
33
import { InputScheme } from "../input/InputSchemeManager"
4-
import { MatchModeType } from "../MatchMode"
54
import { ContactType } from "@/mirabuf/ProtectedZoneSceneObject"
5+
import { MatchModeType } from "@/systems/match_mode/MatchMode"
66

77
/** Names of all global preferences. */
88

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

Lines changed: 25 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,11 @@ describe("ProtectedZoneSceneObject", () => {
122122

123123
instance["zoneCollision"](blueRobotBodyId)
124124

125-
expect(vi.mocked(SimulationSystem.robotPenalty)).toHaveBeenCalledExactlyOnceWith(blueRobot, 5, expect.any(String))
125+
expect(vi.mocked(SimulationSystem.robotPenalty)).toHaveBeenCalledExactlyOnceWith(
126+
blueRobot,
127+
5,
128+
expect.any(String)
129+
)
126130
})
127131

128132
test("ZoneCollision does not penalize same alliance robot", () => {
@@ -187,7 +191,11 @@ describe("ProtectedZoneSceneObject", () => {
187191

188192
instance["handleContactPenalty"](redRobotBodyId, blueRobotBodyId)
189193

190-
expect(vi.mocked(SimulationSystem.robotPenalty)).toHaveBeenCalledExactlyOnceWith(blueRobot, 5, expect.any(String))
194+
expect(vi.mocked(SimulationSystem.robotPenalty)).toHaveBeenCalledExactlyOnceWith(
195+
blueRobot,
196+
5,
197+
expect.any(String)
198+
)
191199
})
192200

193201
test("HandleContactPenalty any robot inside", () => {
@@ -199,7 +207,11 @@ describe("ProtectedZoneSceneObject", () => {
199207

200208
instance["handleContactPenalty"](redRobotBodyId, blueRobotBodyId)
201209

202-
expect(vi.mocked(SimulationSystem.robotPenalty)).toHaveBeenCalledExactlyOnceWith(blueRobot, 5, expect.any(String))
210+
expect(vi.mocked(SimulationSystem.robotPenalty)).toHaveBeenCalledExactlyOnceWith(
211+
blueRobot,
212+
5,
213+
expect.any(String)
214+
)
203215
})
204216

205217
test("HandleContactPenalty blue robot inside", () => {
@@ -211,7 +223,11 @@ describe("ProtectedZoneSceneObject", () => {
211223

212224
instance["handleContactPenalty"](redRobotBodyId, blueRobotBodyId)
213225

214-
expect(vi.mocked(SimulationSystem.robotPenalty)).toHaveBeenCalledExactlyOnceWith(blueRobot, 5, expect.any(String))
226+
expect(vi.mocked(SimulationSystem.robotPenalty)).toHaveBeenCalledExactlyOnceWith(
227+
blueRobot,
228+
5,
229+
expect.any(String)
230+
)
215231
})
216232

217233
test("HandleContactPenalty red robot inside", () => {
@@ -223,7 +239,11 @@ describe("ProtectedZoneSceneObject", () => {
223239

224240
instance["handleContactPenalty"](redRobotBodyId, blueRobotBodyId)
225241

226-
expect(vi.mocked(SimulationSystem.robotPenalty)).toHaveBeenCalledExactlyOnceWith(blueRobot, 5, expect.any(String))
242+
expect(vi.mocked(SimulationSystem.robotPenalty)).toHaveBeenCalledExactlyOnceWith(
243+
blueRobot,
244+
5,
245+
expect.any(String)
246+
)
227247
})
228248

229249
test("HandleContactPenalty doesn't penalize if not all robots are inside", () => {
@@ -243,7 +263,6 @@ describe("ProtectedZoneSceneObject", () => {
243263
contactType: ContactType.ANY_ROBOT_INSIDE,
244264
})
245265

246-
247266
instance["handleContactPenalty"](redRobotBodyId, blueRobotBodyId)
248267

249268
expect(vi.mocked(SimulationSystem.robotPenalty)).not.toHaveBeenCalled()

0 commit comments

Comments
 (0)