(V_CIVIL, V_MILIT, V_SHELL, V_GUN, V_PETROL, V_IRON, V_DUST, V_BAR,
V_FOOD, V_OIL, V_LCM, V_HCM, V_UW, V_RAD, V_ITEM): Remove, use item types instead.
This commit is contained in:
parent
09def8f156
commit
8ef7f35a56
17 changed files with 64 additions and 81 deletions
|
@ -59,7 +59,7 @@ deli(void)
|
|||
if ((ich = whatitem(player->argp[1], "deliver what? ")) == 0)
|
||||
return RET_SYN;
|
||||
/*
|
||||
if (ich->i_vtype == V_CIVIL || ich->i_vtype == V_MILIT) {
|
||||
if (ich->i_vtype == I_CIVIL || ich->i_vtype == I_MILIT) {
|
||||
pr("You cannot deliver people!\n");
|
||||
return RET_FAIL;
|
||||
}
|
||||
|
|
|
@ -99,13 +99,13 @@ drop(void)
|
|||
|
||||
if (target.sct_own == player->cnum
|
||||
|| getrel(getnatp(target.sct_own), player->cnum) == ALLIED) {
|
||||
if (ip->i_vtype == V_CIVIL && target.sct_own != target.sct_oldown) {
|
||||
if (ip->i_vtype == I_CIVIL && target.sct_own != target.sct_oldown) {
|
||||
pr("Can't drop civilians into occupied sectors.\n");
|
||||
return RET_FAIL;
|
||||
}
|
||||
} else {
|
||||
/* into the unknown... */
|
||||
if (ip->i_vtype != V_SHELL) {
|
||||
if (ip->i_vtype != I_SHELL) {
|
||||
pr("You don't own %s!\n", xyas(tx, ty, player->cnum));
|
||||
return RET_FAIL;
|
||||
}
|
||||
|
@ -152,7 +152,7 @@ drop(void)
|
|||
} else {
|
||||
getsect(tx, ty, &target);
|
||||
if (target.sct_type == SCT_WATER && (mission_flags & P_MINE)
|
||||
&& ip->i_vtype == V_SHELL)
|
||||
&& ip->i_vtype == I_SHELL)
|
||||
pln_mine(&bomb_list, &target);
|
||||
else
|
||||
pln_dropoff(&bomb_list, ip, tx, ty, (s_char *)&target, EF_SECTOR);
|
||||
|
|
|
@ -74,7 +74,7 @@ explore(void)
|
|||
if (!(ip = whatitem(player->argp[1], "explore with what? (civ/mil) ")))
|
||||
return RET_SYN;
|
||||
vtype = ip->i_vtype;
|
||||
if ((vtype != V_CIVIL) && (vtype != V_MILIT)) {
|
||||
if ((vtype != I_CIVIL) && (vtype != I_MILIT)) {
|
||||
pr("You can only explore with civs and mil.\n");
|
||||
return RET_FAIL;
|
||||
}
|
||||
|
@ -94,7 +94,7 @@ explore(void)
|
|||
}
|
||||
own = sect.sct_own;
|
||||
mob = (int)sect.sct_mobil;
|
||||
if (vtype == V_CIVIL && sect.sct_oldown != own) {
|
||||
if (vtype == I_CIVIL && sect.sct_oldown != own) {
|
||||
pr("You can't explore with conquered populace!\n");
|
||||
return RET_SYN;
|
||||
}
|
||||
|
@ -103,12 +103,12 @@ explore(void)
|
|||
xyas(sect.sct_x, sect.sct_y, player->cnum));
|
||||
return RET_SYN;
|
||||
}
|
||||
if (vtype == V_CIVIL) {
|
||||
if (vtype == I_CIVIL) {
|
||||
work = sect.sct_work;
|
||||
if (work != 100)
|
||||
pr("Warning: civil unrest\n");
|
||||
loyal = sect.sct_loyal;
|
||||
} else if (vtype == V_MILIT) {
|
||||
} else if (vtype == I_MILIT) {
|
||||
work = 100;
|
||||
loyal = 0;
|
||||
}
|
||||
|
@ -226,7 +226,7 @@ explore(void)
|
|||
sect.sct_work = work;
|
||||
sect.sct_loyal = loyal;
|
||||
}
|
||||
if (vtype == V_CIVIL && sect.sct_oldown != player->cnum) {
|
||||
if (vtype == I_CIVIL && sect.sct_oldown != player->cnum) {
|
||||
pr("Your civilians don't want to stay!\n");
|
||||
getsect(start.sct_x, start.sct_y, §);
|
||||
if (sect.sct_own != own) {
|
||||
|
@ -262,7 +262,7 @@ explore(void)
|
|||
}
|
||||
if (infected && sect.sct_pstage == PLG_HEALTHY)
|
||||
sect.sct_pstage = PLG_EXPOSED;
|
||||
if (vtype == V_CIVIL) {
|
||||
if (vtype == I_CIVIL) {
|
||||
sect.sct_loyal
|
||||
= (amt_dst * sect.sct_loyal + amount * loyal) / (amt_dst + amount);
|
||||
sect.sct_work
|
||||
|
|
|
@ -113,7 +113,7 @@ fly(void)
|
|||
dst_type = EF_SHIP;
|
||||
}
|
||||
|
||||
if (ip && ip->i_vtype == V_CIVIL && target.sct_own != target.sct_oldown) {
|
||||
if (ip && ip->i_vtype == I_CIVIL && target.sct_own != target.sct_oldown) {
|
||||
pr("Can't fly civilians into occupied sectors.\n");
|
||||
return RET_FAIL;
|
||||
}
|
||||
|
|
|
@ -771,7 +771,7 @@ load_comm_ship(struct sctstr *sectp, struct shpstr *sp,
|
|||
move_amt = sect_amt - ITEM_MAX;
|
||||
if (!move_amt)
|
||||
return RET_OK;
|
||||
if (sectp->sct_oldown != player->cnum && item == V_CIVIL) {
|
||||
if (sectp->sct_oldown != player->cnum && item == I_CIVIL) {
|
||||
pr("%s civilians refuse to %s at %s!\n",
|
||||
move_amt < 0 ? "Your" : "Foreign",
|
||||
move_amt < 0 ? "disembark" : "board",
|
||||
|
@ -979,7 +979,7 @@ load_comm_land(struct sctstr *sectp, struct lndstr *lp,
|
|||
xyas(lp->lnd_x, lp->lnd_y, player->cnum));
|
||||
return RET_FAIL;
|
||||
}
|
||||
if (sectp->sct_oldown != player->cnum && item == V_CIVIL) {
|
||||
if (sectp->sct_oldown != player->cnum && item == I_CIVIL) {
|
||||
pr("%s civilians refuse to %s at %s!\n",
|
||||
move_amt < 0 ? "Your" : "Foreign",
|
||||
move_amt < 0 ? "disembark" : "board",
|
||||
|
@ -990,7 +990,7 @@ load_comm_land(struct sctstr *sectp, struct lndstr *lp,
|
|||
lp->lnd_item[item] = land_amt + move_amt;
|
||||
|
||||
/* Did we put mils onto this unit? If so, reset the fortification */
|
||||
if (item == V_MILIT && move_amt > 0)
|
||||
if (item == I_MILIT && move_amt > 0)
|
||||
lp->lnd_harden = 0;
|
||||
if (move_amt >= 0) {
|
||||
pr("%d %s loaded onto %s at %s\n",
|
||||
|
|
|
@ -94,7 +94,7 @@ move(void)
|
|||
* military control necessary to move
|
||||
* goodies in occupied territory.
|
||||
*/
|
||||
if (!istest && sect.sct_oldown != player->cnum && vtype != V_MILIT) {
|
||||
if (!istest && sect.sct_oldown != player->cnum && vtype != I_MILIT) {
|
||||
int tot_mil = 0;
|
||||
struct nstr_item ni;
|
||||
struct lndstr land;
|
||||
|
@ -119,7 +119,7 @@ move(void)
|
|||
}
|
||||
own = sect.sct_own;
|
||||
mob = (int)sect.sct_mobil;
|
||||
if (!istest && vtype == V_CIVIL && sect.sct_oldown != own) {
|
||||
if (!istest && vtype == I_CIVIL && sect.sct_oldown != own) {
|
||||
pr("You can't move conquered populace!\n");
|
||||
return RET_FAIL;
|
||||
}
|
||||
|
@ -128,12 +128,12 @@ move(void)
|
|||
xyas(sect.sct_x, sect.sct_y, player->cnum));
|
||||
return RET_SYN;
|
||||
}
|
||||
if (vtype == V_CIVIL) {
|
||||
if (vtype == I_CIVIL) {
|
||||
work = sect.sct_work;
|
||||
if (work != 100)
|
||||
pr("Warning: civil unrest\n");
|
||||
loyal = sect.sct_loyal;
|
||||
} else if (vtype == V_MILIT) {
|
||||
} else if (vtype == I_MILIT) {
|
||||
work = 100;
|
||||
loyal = 0;
|
||||
}
|
||||
|
@ -251,7 +251,7 @@ move(void)
|
|||
pr("Somebody has captured that sector!\n");
|
||||
getsect(x, y, §);
|
||||
}
|
||||
if (vtype == V_CIVIL && sect.sct_item[I_CIVIL]
|
||||
if (vtype == I_CIVIL && sect.sct_item[I_CIVIL]
|
||||
&& sect.sct_oldown != player->cnum) {
|
||||
pr("Your civilians don't want to stay!\n");
|
||||
getsect(x, y, §);
|
||||
|
@ -330,7 +330,7 @@ move(void)
|
|||
*/
|
||||
if (infected && sect.sct_pstage == PLG_HEALTHY)
|
||||
sect.sct_pstage = PLG_EXPOSED;
|
||||
if (vtype == V_CIVIL) {
|
||||
if (vtype == I_CIVIL) {
|
||||
sect.sct_loyal
|
||||
= (amt_dst * sect.sct_loyal + amount * loyal) / (amt_dst + amount);
|
||||
sect.sct_work
|
||||
|
@ -388,16 +388,16 @@ would_abandon(struct sctstr *sp, int vtype, int amnt, struct lndstr *lp)
|
|||
{
|
||||
int mil, civs, loyalcivs;
|
||||
|
||||
if ((vtype != V_CIVIL) && (vtype != V_MILIT))
|
||||
if ((vtype != I_CIVIL) && (vtype != I_MILIT))
|
||||
return 0;
|
||||
|
||||
mil = sp->sct_item[I_MILIT];
|
||||
civs = sp->sct_item[I_CIVIL];
|
||||
|
||||
if (vtype == V_MILIT)
|
||||
if (vtype == I_MILIT)
|
||||
mil -= amnt;
|
||||
|
||||
if (vtype == V_CIVIL)
|
||||
if (vtype == I_CIVIL)
|
||||
civs -= amnt;
|
||||
|
||||
if (sp->sct_own == sp->sct_oldown)
|
||||
|
|
|
@ -64,7 +64,7 @@ shoo(void)
|
|||
s_char buf[128];
|
||||
|
||||
ip = whatitem(player->argp[1], "Shoot what <civ or uw> ");
|
||||
if (ip == 0 || (ip->i_vtype != V_CIVIL && ip->i_vtype != V_UW))
|
||||
if (ip == 0 || (ip->i_vtype != I_CIVIL && ip->i_vtype != I_UW))
|
||||
return RET_SYN;
|
||||
item = ip->i_vtype;
|
||||
if (!snxtsct(&nstr, player->argp[2]))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue