Skip to content
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

Update the API files #15

Merged
merged 3 commits into from
Oct 14, 2023
Merged

Update the API files #15

merged 3 commits into from
Oct 14, 2023

Conversation

penev92
Copy link
Member

@penev92 penev92 commented Oct 11, 2023

  • Updated the dev version
  • Added a release-20231010 version

Both were generated using OpenRA/OpenRA#21109.

Closes #13, closes #14.

Based on OpenRA dev branch + OpenRA PR 21109.
Based on release-20231010 + OpenRA PR 21109.
Made ReinforceWithTransport()'s `cargoTypes` parameter nullable because it should be but we have no good way of automatically marking it as such. See OpenRA PR 20609.
(based on commit 35cb21a)
--- Current actor stance. Returns nil if this actor doesn't support stances.
---@field Stance string
--- Current health of the actor.
--- **Requires Trait:** [IHealth](https://docs.openra.net/en/release/traits/#ihealth)
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
--- **Requires Trait:** [IHealth](https://docs.openra.net/en/release/traits/#ihealth)
--- **Requires Trait:** [Health](https://docs.openra.net/en/release/traits/#health)

Copy link
Member Author

Choose a reason for hiding this comment

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

The code does say Requires<IHealthInfo> though, which may or may not be the our Health trait 🤔 and as with the IMove case, there is no way to know which implementation this relies on (and it shouldn't rely on a specific implementation anyway).
I am not sure what to do here because IHealth/IMove may not be very understandable to non-programmers, but they are the correct things. I don't know how we could explain "you need one of the traits that implement this interface, which is: A, B, C, D"

Copy link
Member

Choose a reason for hiding this comment

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

I just noticed that this is not a regression. We already have these interface links.

--- Maximum health of the actor.
--- **Requires Trait:** [IHealth](https://docs.openra.net/en/release/traits/#ihealth)
---@type integer
MaxHealth = nil;

--- Enter the target actor to repair it instantly.
--- *Queued Activity*
--- **Requires Traits:** [IMove](https://docs.openra.net/en/release/traits/#imove), [InstantlyRepairs](https://docs.openra.net/en/release/traits/#instantlyrepairs)
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
--- **Requires Traits:** [IMove](https://docs.openra.net/en/release/traits/#imove), [InstantlyRepairs](https://docs.openra.net/en/release/traits/#instantlyrepairs)
--- **Requires Traits:** [Mobile](https://docs.openra.net/en/release/traits/#Mobile), [InstantlyRepairs](https://docs.openra.net/en/release/traits/#instantlyrepairs)

or maybe just unlink it.

@Mailaender Mailaender merged commit 0f2752d into OpenRA:main Oct 14, 2023
@Mailaender
Copy link
Member

Mailaender commented Oct 14, 2023

Created a separate ticket #16 for the interface links. It is actually unrelated to this.

@penev92 penev92 deleted the updateApi branch January 19, 2025 18:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

InitTable members are all considered required Actor/Player properties are considered readonly
2 participants