(SHIPNAMES, opt_SHIPNAMES, Options, carg, name, sorde, qorde)
(show_sail, shi, att_get_combat, pr_com, satdisp, satmap, prship): Remove nooption SHIPNAMES.
This commit is contained in:
parent
df8845199e
commit
786b34c693
12 changed files with 27 additions and 71 deletions
|
@ -87,7 +87,6 @@
|
|||
#define PINPOINTMISSILE /**/
|
||||
#define FALLOUT /* Enables secondary effects caused by radiation */
|
||||
#define SAIL /* A update routine to move ships */
|
||||
#define SHIPNAMES /* Name your ships, removing this option saves space */
|
||||
#define NEUTRON /* Enables Neurton Warheads */
|
||||
#define NOMOBCOST /* No mob cost for firing from ships */
|
||||
/*#define SUPER_BARS *//* Bars can't be destroyed by fire */
|
||||
|
|
|
@ -81,7 +81,6 @@ extern int opt_PINPOINTMISSILE;
|
|||
extern int opt_RES_POP;
|
||||
extern int opt_ROLLOVER_AVAIL;
|
||||
extern int opt_SAIL;
|
||||
extern int opt_SHIPNAMES;
|
||||
extern int opt_SHOWPLANE;
|
||||
extern int opt_SLOW_WAR;
|
||||
extern int opt_SNEAK_ATTACK;
|
||||
|
|
|
@ -8,7 +8,6 @@ SHOWPLANE: planes/units on ships/units up for trade are shown
|
|||
PINPOINT(etc): Missile exist which target ships instead of sectors
|
||||
SAIL: another way to automatically move ships (may also be buggy)
|
||||
NUKEFAIL(etc): nukes on missiles that explode in launching may detonate
|
||||
SHIPNAMES: ships may be named
|
||||
DEMANDUPDATE: updates may be allowed on player demand
|
||||
UPDATESCHED: updates can be controlled by the 'hours' file. NITP
|
||||
|
||||
|
|
|
@ -77,11 +77,8 @@ carg(void)
|
|||
pr("%4d", ship.shp_item[I_LCM]);
|
||||
pr("%4d", ship.shp_item[I_HCM]);
|
||||
pr("%4d\n", ship.shp_item[I_RAD]);
|
||||
if (opt_SHIPNAMES) {
|
||||
if (ship.shp_name[0] != 0) {
|
||||
pr(" %s\n", ship.shp_name);
|
||||
}
|
||||
}
|
||||
if (ship.shp_name[0] != 0)
|
||||
pr(" %s\n", ship.shp_name);
|
||||
}
|
||||
if (nships == 0) {
|
||||
if (player->argp[1])
|
||||
|
|
|
@ -51,10 +51,6 @@ name(void)
|
|||
struct nstr_item nb;
|
||||
s_char buf[1024];
|
||||
|
||||
if (!opt_SHIPNAMES) {
|
||||
pr("Ship naming is not enabled.\n");
|
||||
return RET_FAIL;
|
||||
}
|
||||
if (!snxtitem(&nb, EF_SHIP, player->argp[1]))
|
||||
return RET_SYN;
|
||||
while (nxtitem(&nb, &ship)) {
|
||||
|
|
|
@ -403,7 +403,7 @@ qorde(void)
|
|||
} else
|
||||
pr(" has a sail path\n");
|
||||
|
||||
if (opt_SHIPNAMES && ship.shp_name[0] != 0) {
|
||||
if (ship.shp_name[0] != 0) {
|
||||
if (player->god)
|
||||
pr(" ");
|
||||
pr(" %s\n", ship.shp_name);
|
||||
|
@ -494,7 +494,7 @@ sorde(void)
|
|||
} else
|
||||
pr(" has a sail path\n");
|
||||
|
||||
if (opt_SHIPNAMES && ship.shp_name[0] != 0) {
|
||||
if (ship.shp_name[0] != 0) {
|
||||
if (player->god)
|
||||
pr(" ");
|
||||
pr(" %s\n", ship.shp_name);
|
||||
|
|
|
@ -75,12 +75,10 @@ show_sail(struct nstr_item *nstr)
|
|||
pr("Has orders");
|
||||
}
|
||||
pr("\n");
|
||||
if (opt_SHIPNAMES) {
|
||||
if (ship.shp_name[0] != 0) {
|
||||
if (player->god)
|
||||
pr(" ");
|
||||
pr(" %s\n", ship.shp_name);
|
||||
}
|
||||
if (ship.shp_name[0] != 0) {
|
||||
if (player->god)
|
||||
pr(" ");
|
||||
pr(" %s\n", ship.shp_name);
|
||||
}
|
||||
}
|
||||
if (count == 0) {
|
||||
|
|
|
@ -94,12 +94,10 @@ shi(void)
|
|||
if (opt_FUEL)
|
||||
pr("%5d", ship.shp_fuel);
|
||||
pr("%5d\n", ship.shp_tech);
|
||||
if (opt_SHIPNAMES) {
|
||||
if (ship.shp_name[0] != 0) {
|
||||
if (player->god)
|
||||
pr(" ");
|
||||
pr(" %s\n", ship.shp_name);
|
||||
}
|
||||
if (ship.shp_name[0] != 0) {
|
||||
if (player->god)
|
||||
pr(" ");
|
||||
pr(" %s\n", ship.shp_name);
|
||||
}
|
||||
}
|
||||
if (nships == 0) {
|
||||
|
|
|
@ -243,12 +243,6 @@ int opt_SAIL = 1;
|
|||
int opt_SAIL = 0;
|
||||
#endif
|
||||
|
||||
#ifdef SHIPNAMES
|
||||
int opt_SHIPNAMES = 1;
|
||||
#else
|
||||
int opt_SHIPNAMES = 0;
|
||||
#endif
|
||||
|
||||
#ifdef NEUTRON
|
||||
int opt_NEUTRON = 1;
|
||||
#else
|
||||
|
@ -318,7 +312,6 @@ struct option_list Options[] = {
|
|||
{"PINPOINTMISSILE", &opt_PINPOINTMISSILE},
|
||||
{"RES_POP", &opt_RES_POP},
|
||||
{"SAIL", &opt_SAIL},
|
||||
{"SHIPNAMES", &opt_SHIPNAMES},
|
||||
{"SHOWPLANE", &opt_SHOWPLANE},
|
||||
{"SLOW_WAR", &opt_SLOW_WAR},
|
||||
{"SNEAK_ATTACK", &opt_SNEAK_ATTACK},
|
||||
|
|
|
@ -133,16 +133,10 @@ pr_com(int inon, struct combat *com, natid who)
|
|||
inon ? inon == 1 ? "in " : "into " : "",
|
||||
xyas(com->x, com->y, who));
|
||||
} else if (com->type == EF_SHIP) {
|
||||
if (opt_SHIPNAMES) {
|
||||
return prbuf("%s%s %s(#%d)",
|
||||
inon ? inon == 1 ? "on " : "onto " : "",
|
||||
com->shp_mcp->m_name, com->shp_name,
|
||||
com->shp_uid);
|
||||
} else {
|
||||
return prbuf("%s%s #%d",
|
||||
inon ? inon == 1 ? "on " : "onto " : "",
|
||||
com->shp_mcp->m_name, com->shp_uid);
|
||||
}
|
||||
return prbuf("%s%s %s(#%d)",
|
||||
inon ? inon == 1 ? "on " : "onto " : "",
|
||||
com->shp_mcp->m_name, com->shp_name,
|
||||
com->shp_uid);
|
||||
} else if (com->type == EF_LAND) {
|
||||
return prbuf("%s%s #%d",
|
||||
inon ? inon == 1 ? "on " : "onto " : "",
|
||||
|
@ -266,8 +260,7 @@ att_get_combat(struct combat *com, int isdef)
|
|||
return att_combat_init(com, EF_BAD);
|
||||
}
|
||||
com->shp_mcp = &mchr[(int)ship.shp_type];
|
||||
if (opt_SHIPNAMES)
|
||||
strncpy(com->shp_name, ship.shp_name, MAXSHPNAMLEN);
|
||||
strncpy(com->shp_name, ship.shp_name, MAXSHPNAMLEN);
|
||||
if (!isdef && !player->owner) {
|
||||
if (com->set)
|
||||
pr("%s was just sunk!\n", prcom(0, com));
|
||||
|
|
|
@ -152,11 +152,7 @@ satmap(int x, int y, int eff, int range, int flags, int type)
|
|||
if (flags & P_S) {
|
||||
pr("Satellite ship report\n");
|
||||
prdate();
|
||||
if (opt_SHIPNAMES) {
|
||||
pr(" own shp# ship type sector eff\n");
|
||||
} else {
|
||||
pr(" own shp# ship type sector eff\n");
|
||||
}
|
||||
pr(" own shp# ship type sector eff\n");
|
||||
}
|
||||
while (nxtitem(&ni, &ship)) {
|
||||
if (ship.shp_own == 0)
|
||||
|
@ -169,11 +165,9 @@ satmap(int x, int y, int eff, int range, int flags, int type)
|
|||
if (noise[crackle])
|
||||
continue;
|
||||
if (flags & P_S) {
|
||||
pr("%4d %4d %-16.16s ",
|
||||
pr("%4d %4d %-16.16s %-25.25s ",
|
||||
ship.shp_own, ship.shp_uid,
|
||||
mchr[(int)ship.shp_type].m_name);
|
||||
if (opt_SHIPNAMES)
|
||||
pr("%-25.25s ", ship.shp_name);
|
||||
mchr[(int)ship.shp_type].m_name, ship.shp_name);
|
||||
prxy("%4d,%-4d ", ship.shp_x, ship.shp_y, player->cnum);
|
||||
pr("%3d%%\n", ship.shp_effic);
|
||||
++count;
|
||||
|
@ -313,17 +307,12 @@ satdisp(struct sctstr *sp, int acc, int showstuff)
|
|||
if (mchr[(int)ship.shp_type].m_flags & M_SUB)
|
||||
continue;
|
||||
if (first) {
|
||||
if (opt_SHIPNAMES) {
|
||||
pr("\t own shp# ship type sector eff\n");
|
||||
} else {
|
||||
pr("\t own shp# ship type sector eff\n");
|
||||
}
|
||||
pr("\t own shp# ship type sector eff\n");
|
||||
first = 0;
|
||||
}
|
||||
pr("\t%4d %4d %-16.16s ", ship.shp_own, ship.shp_uid,
|
||||
mchr[(int)ship.shp_type].m_name);
|
||||
if (opt_SHIPNAMES)
|
||||
pr("%-25.25s ", ship.shp_name);
|
||||
pr("\t%4d %4d %-16.16s %-25.25s ",
|
||||
ship.shp_own, ship.shp_uid,
|
||||
mchr[(int)ship.shp_type].m_name, ship.shp_name);
|
||||
prxy("%4d,%-4d ", ship.shp_x, ship.shp_y, player->cnum);
|
||||
pr("%3d%%\n", ship.shp_effic);
|
||||
}
|
||||
|
|
|
@ -126,12 +126,7 @@ shp_init(int n, s_char *ptr)
|
|||
s_char *
|
||||
prship(struct shpstr *sp)
|
||||
{
|
||||
if (opt_SHIPNAMES) {
|
||||
return prbuf("%s %s(#%d)",
|
||||
mchr[(int)sp->shp_type].m_name, sp->shp_name,
|
||||
sp->shp_uid);
|
||||
} else {
|
||||
return prbuf("%s #%d", mchr[(int)sp->shp_type].m_name,
|
||||
sp->shp_uid);
|
||||
}
|
||||
return prbuf("%s %s(#%d)",
|
||||
mchr[(int)sp->shp_type].m_name, sp->shp_name,
|
||||
sp->shp_uid);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue