Skip to content

Conversation

dyceron
Copy link
Contributor

@dyceron dyceron commented Dec 26, 2024

  • Renames fields and updates formatting
  • Moves functions from OSRR to MEDS
  • Add enum for actor layers
  • Add classes for editing position, rotation, and arguments

Copy link

codecov bot commented Dec 26, 2024

Codecov Report

❌ Patch coverage is 94.11765% with 6 lines in your changes missing coverage. Please review.
✅ Project coverage is 78.82%. Comparing base (5e981a7) to head (c62665f).
⚠️ Report is 117 commits behind head on main.

Files with missing lines Patch % Lines
...rc/mercury_engine_data_structures/formats/bmsld.py 94.11% 6 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #258      +/-   ##
==========================================
+ Coverage   77.58%   78.82%   +1.23%     
==========================================
  Files          78       80       +2     
  Lines        4011     4330     +319     
==========================================
+ Hits         3112     3413     +301     
- Misses        899      917      +18     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@dyceron dyceron requested a review from duncathan December 26, 2024 23:20
@dyceron
Copy link
Contributor Author

dyceron commented Dec 26, 2024

Unsure if keeping reference[layer/actor] is worthwhile. It feels very verbose.

scenario.remove_entity({"layer": 9, "actor": "LE_GrappleDest_007"})
vs
scenario.remove_entity(9, "LE_GrappleDest_007")

@ThanatosGit
Copy link
Contributor

Unsure if keeping reference[layer/actor] is worthwhile. It feels very verbose.

scenario.remove_entity({"layer": 9, "actor": "LE_GrappleDest_007"}) vs scenario.remove_entity(9, "LE_GrappleDest_007")

In this case the first variant is just an ugly way of providing two arguments as one argument to the method.

It only makes sense to me because it wouldn't require "unpacking" such things from an input json in the patcher. But as the schema validation guarantees that the keys exists in the dict from the input json, it is definitely better to unpack it in the patcher and use the second variant here because MEDS doesn't know anything about the schema.

@dyceron
Copy link
Contributor Author

dyceron commented Dec 27, 2024

Unsure if keeping reference[layer/actor] is worthwhile. It feels very verbose.
scenario.remove_entity({"layer": 9, "actor": "LE_GrappleDest_007"}) vs scenario.remove_entity(9, "LE_GrappleDest_007")

In this case the first variant is just an ugly way of providing two arguments as one argument to the method.

It only makes sense to me because it wouldn't require "unpacking" such things from an input json in the patcher. But as the schema validation guarantees that the keys exists in the dict from the input json, it is definitely better to unpack it in the patcher and use the second variant here because MEDS doesn't know anything about the schema.

So I should use the less verbose version here then? Or are you saying keep this in OSRR, which probably shouldn't happen?

@ThanatosGit
Copy link
Contributor

So I should use the less verbose version here then?

Yes

@dyceron dyceron requested a review from duncathan December 30, 2024 17:03
@dyceron dyceron requested a review from duncathan December 30, 2024 17:54
Copy link
Contributor

@duncathan duncathan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm gonna finish preparing the Vec2/3/4 pr today which should help with this pr too

@dyceron dyceron requested a review from duncathan January 7, 2025 02:58
Copy link
Contributor

@duncathan duncathan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

let's improve some typing problems. start off like this:

ActorName: TypeAlias = str
ActorGroupName: TypeAlias = str

then adjust the signatures of your API functions to use these types instead of just str as appropriate. a lot of the functions currently have incorrect signatures, so double check all of them

@dyceron dyceron requested a review from duncathan January 15, 2025 02:46
@dyceron dyceron requested a review from duncathan February 13, 2025 03:58
@dyceron dyceron marked this pull request as ready for review February 13, 2025 03:58
@dyceron
Copy link
Contributor Author

dyceron commented Jul 23, 2025

Is this PR in a mergeable state or does it still need to be fixed?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants