-
Notifications
You must be signed in to change notification settings - Fork 41
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: Get worked tile information #2455
Comments
Add a method here: https://github.com/longturn/freeciv21/blob/master/common/scriptcore/tolua_game.pkg#L268 Back it up with a new function here: https://github.com/longturn/freeciv21/blob/master/common/scriptcore/api_game_methods.h#L124 Add the implementation to this file: https://github.com/longturn/freeciv21/blob/master/common/scriptcore/api_game_methods.cpp |
When I was looking at this before, I was curious about this. When is this struct used vs the module?
|
Do you want the server to have this information to do somethng automatically or you want the player to have easier access to the information? If it's the latter, shift-alt-rightclick may help. |
This is about using it for scripting, e.g. to create militia units on worked tiles to slow down invasions. |
Hmmm... So, when you conquer a city, you instantly get a militia on forward tiles? |
longturn/Sim#4 The idea for this was to have them appear at TC. Though for this task, it's really just to allow us to access city worked tile info for ANY scripted purpose. |
Is your feature request related to a problem? Please describe.
I need a way to find out which tiles are being worked by which cities in Lua.
Describe the solution you'd like
Make the
worked
variable available through the Tile type.freeciv21/common/tile.h
Line 51 in 15cfe08
Describe alternatives you've considered
An iterator on the City type over all of its worked tiles would also work.
Additional context
Blocks longturn/Sim#4
The text was updated successfully, but these errors were encountered: