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

Misc API Enhancements #5975

Merged
merged 8 commits into from Jul 13, 2023
Merged

Conversation

Noordfrees
Copy link
Member

Type of change
New features

Issue(s) closed
Re https://www.widelands.org/forum/topic/5797 & https://www.widelands.org/forum/post/40418/

  • Write map tags array in wl_map_info
  • Add function LuaWorker::evict
  • Add property LuaMapObject.exists
  • Expose worker buildcost to modify_unit

Additional context
These are all very small additions so I didn't think it worth having separate PRs for them.

- Write tags in wl_map_info
- Add function `LuaWorker::evict`
- Add property `LuaMapObject.exists`
- Expose worker buildcost to `modify_unit`
@Noordfrees Noordfrees added enhancement New feature or request maps Map design lua Lua scripts and scripting interface labels Jul 1, 2023
@Noordfrees Noordfrees added this to the v1.2 milestone Jul 1, 2023
@Noordfrees Noordfrees self-assigned this Jul 1, 2023
Copy link
Contributor

@hessenfarmer hessenfarmer left a comment

Choose a reason for hiding this comment

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

would it be possible to test the worker eviction as well in our lua testsuite?
Rest looks good to me

Copy link
Contributor

@hessenfarmer hessenfarmer left a comment

Choose a reason for hiding this comment

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

Code LGTM.
Do we need to test the addon logic. It seems to be straight forward.

@Noordfrees
Copy link
Member Author

I tried it out in a sample add-on by just adding the calls and checking that the encyclopedia shows the expected modified worker buildcosts. modify_unit can't easily be tested in the testsuite. So let's have it when the builds are through.

@Noordfrees Noordfrees enabled auto-merge (squash) July 13, 2023 17:33
@Noordfrees Noordfrees merged commit 10b692a into widelands:master Jul 13, 2023
33 checks passed
@Noordfrees Noordfrees deleted the misc-api-enhancements branch July 14, 2023 07:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request lua Lua scripts and scripting interface maps Map design
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants