Feature #1541
closedAdd specialist subtarget kind
0%
Description
Add ASTK_SPECIALIST value and insert it into some switches.
This ticket is prerequisite for #1478 but may also be used later for turning citizens management into actions.
Side note - currently a client can theoretically toggle any pair of specialists, as an action with single specialist subtarget each specialist toggles to a fixed another one, but an opportunity to do other has been never requested.
Files
Updated by Alexandr Ignatiev about 1 month ago
- Blocks Feature #1478: Player controlled superspecialist addition added
Updated by Alexandr Ignatiev about 1 month ago
A patch currently tested only in that gtk4 client compiles
Updated by Alexandr Ignatiev about 1 month ago
Oops, looking better at how actions are called, we can't query specific subtarget in an action enabler. Thus, to realize joining city as superspecialist, I will have to accomplish also plan A - make specialist a unit type field. Thus, superspecialist as a selectible subtarget remains for a player's action.
Updated by Marko Lindqvist about 1 month ago
../../src/client/gui-sdl2/action_dialog.c: In function ‘simple_action_callback’:
../../src/client/gui-sdl2/action_dialog.c:814:10: error: this statement may fall through [-Werror=implicit-fallthrough=]
814 | if (nullptr == specialist_by_number(sub_target)) {
| ^
../../src/client/gui-sdl2/action_dialog.c:818:5: note: here
818 | case ASTK_NONE:
| ^~~~
Likely same for sdl3-client.
Updated by Alexandr Ignatiev about 1 month ago
Edited.
Updated by Alexandr Ignatiev about 1 month ago
- Blocks Feature #1552: Add "Settle Specialist" player action added
Updated by Marko Lindqvist about 1 month ago
This is in conflict with #1535, but I'm not yet sure which one should go in first, and which one needs to be rebased.
Updated by Marko Lindqvist about 1 month ago
Marko Lindqvist wrote in #note-7:
This is in conflict with #1535, but I'm not yet sure which one should go in first, and which one needs to be rebased.
I think #1535 should go in first, as it has already been some time in my work stack and is ready to go in soon, whereas this ticket will anyway be subjected to autogame testing round first.
Updated by Marko Lindqvist about 1 month ago
- Blocked by Feature #1535: unithand.c: Improve coding style added
Updated by Alexandr Ignatiev about 1 month ago
Marko Lindqvist wrote in #note-10:
Will you rebase this.
Probably yes, I am slowly approaching to patches that make use of it to shape it better and get it tested.
Updated by Alexandr Ignatiev 29 days ago
Seems to apply now.
Updated by Marko Lindqvist 29 days ago
- Status changed from New to In Review
- Assignee set to Marko Lindqvist
Updated by Marko Lindqvist 29 days ago
- Blocks Feature #1488: Make GTK and Qt clients menu items more similar added
Updated by Marko Lindqvist 26 days ago
savegame3.c:
'if (!loading->specialist.order[order_sub_tgt]) {'
with an untrusted order_sub_tgt value from a savegame might access memory outside the loading->specialist.order array.
Updated by Marko Lindqvist 25 days ago
- Status changed from In Review to In Progress
- Assignee changed from Marko Lindqvist to Alexandr Ignatiev
Updated by Alexandr Ignatiev 21 days ago
currently out for a while, probably won't fix that in about a month
Updated by Marko Lindqvist 18 days ago
- File 0052-Add-specialist-subtarget-kind.patch 0052-Add-specialist-subtarget-kind.patch added
- Status changed from In Progress to In Review
- Assignee changed from Alexandr Ignatiev to Marko Lindqvist
Alexandr Ignatiev wrote in #note-17:
currently out for a while, probably won't fix that in about a month
I did the minor fix myself. Likely also merge it in the coming days, despite also trying to have some vacation myself.