Project

General

Profile

Feature #2334 ยป 2334.patch

Dean Brown, 10/05/2026 05:59 AM

View differences:

server/unithand.c
const struct unit_type *act_utype;
int new_food;
int savings_pct = city_growth_granary_savings(pcity);
Specialist_type_id sspec;
/* Sanity check: The actor is still alive. */
fc_assert_ret_val(punit, FALSE);
......
citizens_update(pcity, unit_nationality(punit));
if (is_super_specialist(act_utype->spec_type)) {
Specialist_type_id sspec = specialist_index(act_utype->spec_type);
sspec = specialist_index(act_utype->spec_type);
fc_assert_ret_val(pcity->specialists[sspec] < MAX_CITY_SIZE, FALSE);
pcity->specialists[sspec]++;
......
city_refresh(pcity);
} else {
fc_assert_ret_val(amount > 0, FALSE);
sspec = act_utype->spec_type ?
specialist_index(act_utype->spec_type) :
DEFAULT_SPECIALIST;
/* Make the new people something, otherwise city fails the checks */
pcity->specialists[DEFAULT_SPECIALIST] += amount;
pcity->specialists[sspec] += amount;
/* Make the new people do something useful */
auto_arrange_workers(pcity); /* this calls city_refresh(pcity) */
}
    (1-1/1)