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

Lua: Support notifications with featured text #2473

Open
XHawk87 opened this issue Dec 28, 2024 · 3 comments
Open

Lua: Support notifications with featured text #2473

XHawk87 opened this issue Dec 28, 2024 · 3 comments
Labels
enhancement New feature or request port-from-freeciv This was implemented in Freeciv server This issue requires changes to the server

Comments

@XHawk87
Copy link
Contributor

XHawk87 commented Dec 28, 2024

Is your feature request related to a problem? Please describe.
I want to be able to send notifications to players including tile, unit, and city links in them using lua.

Describe the solution you'd like
As documented in the Lua Reference Manual:

  • Add link_text method to City type
  • Add tile_link_text method to City type
  • Add link_text method to Unit type
  • Add tile_link_text method to Unit type
  • Add link_text method to Tile type

Describe alternatives you've considered
It might technically be possible to manually duplicate the format for featured text in message strings but that would be ugly and messy.

Additional context
This was already been done in: https://github.com/freeciv/freeciv/blob/64f64a14ea220185058d8b57de2bf5c809169a18/common/scriptcore/api_game_methods.h#L220

@XHawk87 XHawk87 added enhancement New feature or request Untriaged This issue or PR needs triaging labels Dec 28, 2024
@lmoureaux
Copy link
Contributor

Can you pinpoint the commit on the fc side?

@lmoureaux lmoureaux added server This issue requires changes to the server port-from-freeciv This was implemented in Freeciv and removed Untriaged This issue or PR needs triaging labels Dec 28, 2024
@XHawk87
Copy link
Contributor Author

XHawk87 commented Dec 28, 2024

@lmoureaux
Copy link
Contributor

Thanks! Doesn't seem difficult to port. Change function headers and ship it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request port-from-freeciv This was implemented in Freeciv server This issue requires changes to the server
Projects
None yet
Development

No branches or pull requests

2 participants