Skip to content

Commit

Permalink
Merge branch 'main' into pre-commit-ci-update-config
Browse files Browse the repository at this point in the history
  • Loading branch information
ThanatosGit authored Apr 7, 2024
2 parents 1ffcb9b + c1e22b2 commit a107223
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 12 deletions.
6 changes: 3 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -63,13 +63,13 @@ filterwarnings = [

[tool.ruff]
line-length = 120
select = ["E", "F", "W", "C90", "I", "UP"]
lint.select = ["E", "F", "W", "C90", "I", "UP"]
src = ["src"]

# Version to target for generated code.
target-version = "py38"

[tool.ruff.mccabe]
[tool.ruff.lint.mccabe]
# Flag errors (`C901`) whenever the complexity level exceeds 25.
# Defaults to 10, but we're being very flexible right now
max-complexity = 25
max-complexity = 25
13 changes: 4 additions & 9 deletions src/mercury_engine_data_structures/formats/collision.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
from construct import Array, Flag, Hex, IfThenElse, Int16ul, Rebuild, Struct

from mercury_engine_data_structures import game_check
from mercury_engine_data_structures.common_types import CVector2D, Float, UInt, make_vector
from mercury_engine_data_structures.common_types import CVector2D, CVector3D, Float, UInt, make_vector
from mercury_engine_data_structures.construct_extensions.misc import OptionalValue
from mercury_engine_data_structures.game_check import Game

Expand Down Expand Up @@ -38,14 +38,11 @@

collision_formats = {
"AABOX2D": Struct(
center=CVector2D,
unk=Float,
position=CVector3D,
size=CVector2D,
),
"CIRCLE": Struct(
value1=Float,
value2=Float,
value3=Float,
position=CVector3D,
size=Float,
),
"CAPSULE2D": Struct(
Expand All @@ -56,9 +53,7 @@
value5=Float,
),
"POLYCOLLECTION2D": Struct(
unknown1=UInt,
unknown2=UInt,
unknown3=UInt,
position=CVector3D,
polys=make_vector(CollisionPoly),
total_boundings=Array(4, Float),
binary_search_trees=OptionalValue(make_vector(BinarySearchTree)),
Expand Down

0 comments on commit a107223

Please sign in to comment.