Project

General

Profile

Actions

Feature #1541

closed

Add specialist subtarget kind

Added by Alexandr Ignatiev about 1 month ago. Updated 13 days ago.

Status:
Closed
Priority:
Normal
Category:
General
Target version:
Start date:
06/27/2025
Due date:
% Done:

0%

Estimated time:

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


Related issues 4 (3 open1 closed)

Blocks Feature #1478: Player controlled superspecialist additionNew05/30/2025

Actions
Blocks Feature #1552: Add "Settle Specialist" player actionNew07/01/2025

Actions
Blocked by Feature #1535: unithand.c: Improve coding styleClosedMarko Lindqvist06/22/2025

Actions
Blocks Feature #1488: Make GTK and Qt clients menu items more similarIn ProgressDean Brown06/05/2025

Actions
Actions #1

Updated by Alexandr Ignatiev about 1 month ago

  • Blocks Feature #1478: Player controlled superspecialist addition added
Actions #2

Updated by Alexandr Ignatiev about 1 month ago

A patch currently tested only in that gtk4 client compiles

Actions #3

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.

Actions #4

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.

Actions #6

Updated by Alexandr Ignatiev about 1 month ago

  • Blocks Feature #1552: Add "Settle Specialist" player action added
Actions #7

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.

Actions #8

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.

Actions #9

Updated by Marko Lindqvist about 1 month ago

  • Blocked by Feature #1535: unithand.c: Improve coding style added
Actions #10

Updated by Marko Lindqvist about 1 month ago

Will you rebase this.

Actions #11

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.

Actions #13

Updated by Marko Lindqvist 29 days ago

  • Status changed from New to In Review
  • Assignee set to Marko Lindqvist
Actions #14

Updated by Marko Lindqvist 29 days ago

  • Blocks Feature #1488: Make GTK and Qt clients menu items more similar added
Actions #15

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.

Actions #16

Updated by Marko Lindqvist 25 days ago

  • Status changed from In Review to In Progress
  • Assignee changed from Marko Lindqvist to Alexandr Ignatiev
Actions #17

Updated by Alexandr Ignatiev 21 days ago

currently out for a while, probably won't fix that in about a month

Actions #18

Updated by Marko Lindqvist 18 days ago

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.

Actions #19

Updated by Marko Lindqvist 13 days ago

  • Status changed from In Review to Closed
Actions

Also available in: Atom PDF