(do_desi): Move check for redesignated capital behind the actual
redesignation. Closes #803768.
This commit is contained in:
parent
64afd7747b
commit
64fa28aa34
1 changed files with 6 additions and 11 deletions
|
@ -150,10 +150,6 @@ do_desi(struct natstr *natp, s_char *sects, s_char *deschar, long int cash,
|
||||||
continue;
|
continue;
|
||||||
if (sect.sct_type == SCT_SANCT)
|
if (sect.sct_type == SCT_SANCT)
|
||||||
breaksanct++;
|
breaksanct++;
|
||||||
if (sect.sct_x == cap_x && sect.sct_y == cap_y &&
|
|
||||||
des != SCT_CAPIT && des != SCT_SANCT &&
|
|
||||||
des != SCT_MOUNT && for_real)
|
|
||||||
pr("You have redesignated your capital!\n");
|
|
||||||
if (des == SCT_HARBR) {
|
if (des == SCT_HARBR) {
|
||||||
for (n = 1; n <= 6; n++) {
|
for (n = 1; n <= 6; n++) {
|
||||||
getsect(nstr.x + diroff[n][0],
|
getsect(nstr.x + diroff[n][0],
|
||||||
|
@ -204,9 +200,8 @@ do_desi(struct natstr *natp, s_char *sects, s_char *deschar, long int cash,
|
||||||
if ((sect.sct_newtype != des) && (sect.sct_type != des)
|
if ((sect.sct_newtype != des) && (sect.sct_type != des)
|
||||||
&& dchr[des].d_cost) {
|
&& dchr[des].d_cost) {
|
||||||
if (for_real) {
|
if (for_real) {
|
||||||
if (check_cost
|
if (check_cost(!deschar, dchr[des].d_cost, cash, &warned,
|
||||||
(!deschar, dchr[des].d_cost, cash, &warned,
|
player->argp[3]))
|
||||||
player->argp[3]))
|
|
||||||
break;
|
break;
|
||||||
} else {
|
} else {
|
||||||
cost += dchr[des].d_cost;
|
cost += dchr[des].d_cost;
|
||||||
|
@ -216,15 +211,15 @@ do_desi(struct natstr *natp, s_char *sects, s_char *deschar, long int cash,
|
||||||
if (sect.sct_effic < 5 || player->god) {
|
if (sect.sct_effic < 5 || player->god) {
|
||||||
sect.sct_type = des;
|
sect.sct_type = des;
|
||||||
sect.sct_effic = 0;
|
sect.sct_effic = 0;
|
||||||
/* No longer tear down infrasturcture
|
|
||||||
sect.sct_road = 0;
|
|
||||||
sect.sct_defense = 0;
|
|
||||||
*/
|
|
||||||
changed += map_set(player->cnum, sect.sct_x, sect.sct_y,
|
changed += map_set(player->cnum, sect.sct_x, sect.sct_y,
|
||||||
dchr[des].d_mnem, 0);
|
dchr[des].d_mnem, 0);
|
||||||
}
|
}
|
||||||
sect.sct_newtype = des;
|
sect.sct_newtype = des;
|
||||||
putsect(§);
|
putsect(§);
|
||||||
|
if (sect.sct_x == cap_x && sect.sct_y == cap_y
|
||||||
|
&& des != SCT_CAPIT && des != SCT_SANCT && des != SCT_MOUNT
|
||||||
|
&& for_real)
|
||||||
|
pr("You have redesignated your capital!\n");
|
||||||
if (opt_EASY_BRIDGES == 0) { /* may cause a bridge fall */
|
if (opt_EASY_BRIDGES == 0) { /* may cause a bridge fall */
|
||||||
if (n != SCT_BHEAD)
|
if (n != SCT_BHEAD)
|
||||||
continue;
|
continue;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue