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: Get worked tile information #2455

Open
XHawk87 opened this issue Dec 12, 2024 · 6 comments
Open

Lua: Get worked tile information #2455

XHawk87 opened this issue Dec 12, 2024 · 6 comments
Labels
enhancement New feature or request server This issue requires changes to the server spec-file Related to Rulesets, Tilesets, Musicsets, Soundsets, etc.

Comments

@XHawk87
Copy link
Collaborator

XHawk87 commented Dec 12, 2024

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.

struct city *worked; // nullptr for not worked

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

@XHawk87 XHawk87 added enhancement New feature or request Untriaged This issue or PR needs triaging labels Dec 12, 2024
@lmoureaux lmoureaux added server This issue requires changes to the server spec-file Related to Rulesets, Tilesets, Musicsets, Soundsets, etc. and removed Untriaged This issue or PR needs triaging labels Dec 15, 2024
@XHawk87
Copy link
Collaborator Author

XHawk87 commented Dec 15, 2024

When I was looking at this before, I was curious about this. When is this struct used vs the module?

@Corbeau-1
Copy link
Contributor

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.

@lmoureaux
Copy link
Contributor

This is about using it for scripting, e.g. to create militia units on worked tiles to slow down invasions.

@Corbeau-1
Copy link
Contributor

Hmmm... So, when you conquer a city, you instantly get a militia on forward tiles?

@XHawk87
Copy link
Collaborator Author

XHawk87 commented Dec 21, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request server This issue requires changes to the server spec-file Related to Rulesets, Tilesets, Musicsets, Soundsets, etc.
Projects
None yet
Development

No branches or pull requests

3 participants