(shp_nav_one_sector, mchr[], ship_chr_flags[], Ship-types, Sector-types):

Add M_CANAL flag to indicate which ships can navigate a canal
in a big city.  Remove the hard code values for canal from
shp_nav_one_sector() for which ships can navigate a canal.
Set M_CANAL flag in ship_chr_flags[] to match the hard
coding in shp_nav_one_sector().
Update Ship-types.t with new canal flag.
Update Sector-types.t to indicate that cities have canals.
This commit is contained in:
Ron Koenderink 2005-12-18 15:16:52 +00:00
parent 6157409f20
commit 9217e75761
6 changed files with 15 additions and 8 deletions

View file

@ -174,6 +174,7 @@ struct mchrstr {
#define M_CHOPPER bit(16) /* can hold choppers */
#define M_OILER bit(17) /* can re-fuel ships */
#define M_SUPPLY bit(18) /* Can supply units/sects/ships */
#define M_CANAL bit(19) /* Can navigate a canal (BIG CITY) */
#define M_ANTIMISSILE bit(20) /* Shoot down missile */
#define getship(n, p) \

View file

@ -83,6 +83,9 @@ perhaps like Pancho Villa. Note that if the BIG_CITY option is
enabled, then 'c' sectors stand for 'cities' and can hold 10x as many
civs. They also get a 10x packing bonus for moving civs, and require
a certain number of lcm's, hcm's, and $$ to build (see show sect build).
Cities also have canals which allows ships with canal cability
(see info \*QShip-types\*U) to navigate
through them.
.s1
PARK - Parks are provided solely for the convenience of the
people.
@ -413,4 +416,4 @@ one product, tech and edu requirements, production efficiency
multiplier, monetary cost and resource depletion. See info
\*QProducts\*U for details.
.s1
.SA "improve, designate, show, BTU, Sectors"
.SA "improve, designate, show, BTU, Sectors, Ship-types"

View file

@ -267,6 +267,8 @@ The vessel is a trade ship. (only if TRADESHIPS are enabled)
.L supply
The vessel can supply other units.
Unless the vessel is a submarine, it can load non-light land units.
.L canal
The vessel can navigate canals (see info \*QSector-types\*U).
.L anti-missile
The vessel will intercept enemy marine missiles (see \*Qinfo Hitchance\*U).
.in
@ -312,4 +314,4 @@ battleship 1 120m 20s 4g 120f semi-land
fishing boat 2 300c 10m 900f 15u fish
.FI
.s1
.SA "coastwatch, fire, load, lookout, mine, navigate, tend, torpedo, fly, show, Trade-ships, Ships"
.SA "coastwatch, fire, load, lookout, mine, navigate, tend, torpedo, fly, show, Trade-ships, Ships, Sector-types"

View file

@ -567,6 +567,7 @@ struct symbol ship_chr_flags[] = {
{M_SEMILAND, "semi-land"},
{M_OILER, "oiler"},
{M_SUPPLY, "supply"},
{M_CANAL, "canal"},
{M_ANTIMISSILE, "anti-missile"},
{0, NULL}
};

View file

@ -57,11 +57,11 @@ struct mchrstr mchr[] = {
{{300, 10, 0, 0, 0, 0, 0, 0, 900, 0, 0, 0, 15, 0},
25, 15, 10, 10, 15, 2, 0, 0, 0, 0, 0, 0, "fb fishing boat",
0, 180, M_FOOD, 0, 0},
0, 180, M_FOOD | M_CANAL, 0, 0},
{{300, 10, 0, 0, 0, 0, 0, 0, 900, 0, 0, 0, 15, 0},
25, 15, 10, 25, 15, 2, 0, 0, 0, 0, 20, 1, "ft fishing trawler",
35, 300, M_FOOD, 0, 0},
35, 300, M_FOOD | M_CANAL, 0, 0},
{{600, 50, 300, 50, 0, 0, 0, 0, 900, 0,1400, 900, 250, 0},
60, 40, 20, 25, 35, 3, 0, 0, 1, 0, 0, 0, "cs cargo ship",
@ -85,7 +85,7 @@ struct mchrstr mchr[] = {
{{10, 5, 0, 0, 0, 0, 0, 0, 100, 1, 0, 0, 0, 0},
25, 15, 10, 25, 15, 2, 0, 0, 0, 0, 20, 1, "oe oil exploration boat",
40, 800, M_OIL, 0, 0},
40, 800, M_OIL | M_CANAL, 0, 0},
{{990, 80, 0, 0, 0, 0, 0, 0, 990, 990, 0, 0, 990, 0},
60, 60, 30, 15, 65, 3, 0, 0, 2, 0, 0, 0, "od oil derrick",
@ -93,7 +93,7 @@ struct mchrstr mchr[] = {
{{0, 2, 12, 2, 0, 0, 0, 0, 5, 0, 0, 0, 0, 0},
20, 10, 10, 38, 10, 2, 1, 1, 0, 0, 4, 1, "pt patrol boat",
40, 300, M_TORP, 0, 0},
40, 300, M_TORP | M_CANAL, 0, 0},
{{0, 100, 40, 5, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0},
30, 40, 50, 30, 30, 5, 6, 3, 1, 0, 40, 1, "lc light cruiser",
@ -121,7 +121,7 @@ struct mchrstr mchr[] = {
{{0, 10, 100, 1, 0, 0, 0, 0, 90, 0, 0, 0, 0, 0},
25, 15, 10, 25, 15, 2, 0, 0, 0, 0, 20, 1, "ms minesweeper",
40, 400, M_MINE | M_SWEEP, 0, 0},
40, 400, M_MINE | M_SWEEP | M_CANAL, 0, 0},
{{0, 60, 40, 4, 0, 0, 0, 0, 80, 0, 0, 0, 0, 0},
30, 30, 45, 35, 20, 4, 6, 3, 1, 0, 30, 1, "dd destroyer",

View file

@ -835,7 +835,7 @@ shp_nav_one_sector(struct emp_qelem *list, int dir, natid actor,
}
}
if (IS_BIG_CITY(sect.sct_type)) {
if (mlp->mcp->m_lcm + 2 * mlp->mcp->m_hcm >= 60) {
if (!(mlp->mcp->m_flags & M_CANAL)) {
sprintf(dp,
"is too large to fit into the canal system at %s",
xyas(newx, newy, actor));