Project

General

Profile

Actions

Feature #2334

closed

city_add_unit(), handle spec_type either nullptr or not

Added by Dean Brown 30 days ago. Updated 11 days ago.

Status:
Closed
Priority:
Normal
Category:
Server
Target version:
Start date:
10/05/2026
Due date:
% Done:

0%

Estimated time:

Description

Follow on to #1618 and #2187, dealing with super specialists and possibility of unit_type's spec_type being nullptr.


Files

2334.patch (841 Bytes) 2334.patch Dean Brown, 10/17/2026 05:01 AM

Related issues 1 (0 open — 1 closed)

Blocked by Feature #2187: Main: load_ruleset_units(): allow spec_type to be NULL if no specialist entryClosedMarko Lindqvist08/30/2026

Actions
Actions #1

Updated by Dean Brown 30 days ago

  • File 2334.patch added

Main only.

Actions #2

Updated by Marko Lindqvist 30 days ago

  • Blocked by Feature #2187: Main: load_ruleset_units(): allow spec_type to be NULL if no specialist entry added
Actions #3

Updated by Marko Lindqvist 19 days ago

Does this patch (as it's currently implement) change anything? Isn't the auto_arrange_workers() in the end converting the specialists to field workers even if they are, for less than a millisecond, specialists of other type than DEFAULT_SPECIALIST?
Even if it doesn't, calling auto_arrange_workers() breaks things when unit spec_type is DEFAULT_SPECIALIST.

I think this ticket should basically replace "if (is_super_specialist()) {" with "if (act_utype->spec_type != nullptr) {"

Actions #4

Updated by Dean Brown 18 days ago

  • File deleted (2334.patch)
Actions #5

Updated by Dean Brown 18 days ago

This is better.

Actions #6

Updated by Marko Lindqvist 18 days ago

  • Status changed from New to In Review
  • Assignee set to Marko Lindqvist
  • Target version set to 3.4.0
Actions #7

Updated by Marko Lindqvist 11 days ago

  • Status changed from In Review to Closed
Actions

Also available in: Atom PDF