-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add classes to BMSBK #263
base: main
Are you sure you want to change the base?
Add classes to BMSBK #263
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #263 +/- ##
==========================================
+ Coverage 77.62% 77.79% +0.16%
==========================================
Files 79 79
Lines 4027 4057 +30
==========================================
+ Hits 3126 3156 +30
Misses 901 901 ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please add tests for the other properties to get full code coverage
construct.Terminated, | ||
) # fmt: skip | ||
|
||
|
||
class BlockType(Enum): | ||
class BlockType(StrEnum): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
StrEnum breaks python 3.10 - do class BlockType(str, Enum)
instead
original_type = block_group.block_type | ||
assert original_type == BlockType.POWER_BOMB | ||
block_group.block_type = BlockType.BOMB | ||
assert original_type != BlockType.BOMB |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
block_group = surface_bmsbk.get_block_group(0)
assert block_group.block_type is BlockType.POWER_BOMB
block_group.block_type = BlockType.BOMB
assert block_group.block_type is BlockType.BOMB
original_time = block.respawn_time | ||
assert original_time == 0.0 | ||
block.respawn_time = 5.0 | ||
assert original_time != block.respawn_time |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
block = surface_bmsbk.get_block_group(0).get_block(0)
assert block.respawn_time == 0.0
block.respawn_time = 5.0
assert block.respawn_time == 5.0
assert block.model_name != "sg_casca80" | ||
|
||
block.vignette_name = "sg_real_vignette" | ||
assert block.vignette_name != "" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
block = surface_bmsbk.get_block_group(0).get_block(0)
assert block.model_name == "sd_casca80"
block.model_name = "sg_real_model"
assert block.model_name == "sg_real_model"
assert block.vignette_name == ""
block.vignette_name = "sg_real_vignette"
assert block.vignette_name == "sg_real_vignette"
original_position = block.position | ||
assert original_position == [-23100.0, 10700.0, 0.0] | ||
block.position = [100.0, 200.0, 0.0] | ||
assert original_position != block.position |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
block = surface_bmsbk.get_block_group(0).get_block(0)
assert block.position == [-23100.0, 10700.0, 0.0]
block.position = Vec3(100.0, 200.0, 0.0)
assert block.position == [100.0, 200.0, 0.0]
Now has classes with properties to better handle modifying
block_groups