Feature #1490
openLua API: workers control
0%
Description
- (City):work_tile(Tile t, Specialist pref_spec?)
- (City):work_tile(Tile t, Tile take_from)
- (City):reclaim_worker(Tile t, Specialist pref_spec?)
- (City):reclaim_all_workers()
- (City):auto_arrange_workers()
- (City):worked_iterate(bool center?)
- (City):cma_controlled() -- this maybe could return cma name, see my 2.6 tweaked branch
This allows saving and restoring citizens state. Functions for pinning workers/switching CMA on and off/placing tasks/etc may be added later if needed
Updated by Marko Lindqvist 6 days ago
Alexandr Ignatiev wrote:
- (City):cma_controlled() -- this maybe could return cma name, see my 2.6 tweaked branch
Is this client-side only, or do you mean to support server-side CMA with this? Server-side CMA is currently available for web-client only. Allowing regular clients to use it might cause bigger multiplayer games to burn too much server-side CPU when CMA of all cities of all players are handled on the server.
Updated by Alexandr Ignatiev 5 days ago
Marko Lindqvist wrote in #note-1:
Is this client-side only, or do you mean to support server-side CMA with this? Server-side CMA is currently available for web-client only. Allowing regular clients to use it might cause bigger multiplayer games to burn too much server-side CPU when CMA of all cities of all players are handled on the server.
I had a vision that CMA has in some moment migrated to servers. Well, if not, it should be a boolean property, maybe with :cma_name()
method in clients. Maybe we should then have some special API for web servers?