From 3e15a8e2261f81f656d7ef4a8400d41f38a850b9 Mon Sep 17 00:00:00 2001 From: Markus Armbruster Date: Tue, 16 Sep 2008 19:11:18 -0400 Subject: [PATCH] Make trade show exactly what's on sale, remove option SHOW_PLANE Planes and land units on ships are sold along with the ship, but trade showed them only when SHOWPLANE was enabled. Show them always. Planes on land units are not sold along with the land unit, but trade showed them when SHOWPLANE was enabled. Don't. --- include/econfig-spec.h | 2 -- info/Options.t | 1 - src/lib/global/options.c | 1 - src/lib/subs/trdsub.c | 64 ++++++++++++++++------------------------ 4 files changed, 25 insertions(+), 43 deletions(-) diff --git a/include/econfig-spec.h b/include/econfig-spec.h index 565fa687..e2a85ce6 100644 --- a/include/econfig-spec.h +++ b/include/econfig-spec.h @@ -181,8 +181,6 @@ EMPCF_OPT("RES_POP", opt_RES_POP, "Population is limited by research") EMPCF_OPT("SAIL", opt_SAIL, "Enable sail command") -EMPCF_OPT("SHOWPLANE", opt_SHOWPLANE, - "Show planes and land units embarked on ships or land units up for trade") EMPCF_OPT("SLOW_WAR", opt_SLOW_WAR, "Declaring war takes time") EMPCF_OPT("SUPER_BARS", opt_SUPER_BARS, diff --git a/info/Options.t b/info/Options.t index 777a3a6e..23d03ad6 100644 --- a/info/Options.t +++ b/info/Options.t @@ -4,7 +4,6 @@ .nf The following options are from KSU code: -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) DEMANDUPDATE: updates may be allowed on player demand diff --git a/src/lib/global/options.c b/src/lib/global/options.c index c697f96d..561bd141 100644 --- a/src/lib/global/options.c +++ b/src/lib/global/options.c @@ -59,7 +59,6 @@ int opt_NO_PLAGUE = 1; int opt_PINPOINTMISSILE = 1; int opt_RES_POP = 0; int opt_SAIL = 1; -int opt_SHOWPLANE = 1; int opt_SLOW_WAR = 0; int opt_SUPER_BARS = 0; int opt_TECH_POP = 0; diff --git a/src/lib/subs/trdsub.c b/src/lib/subs/trdsub.c index 512b2fbc..8195642b 100644 --- a/src/lib/subs/trdsub.c +++ b/src/lib/subs/trdsub.c @@ -129,33 +129,31 @@ trade_desc(struct trdstr *tp, union empobj_storage *tgp) pr("%c:%d ", ichr[it].i_mnem, sp->shp_item[it]); } pr("] #%d", tp->trd_unitid); - if (opt_SHOWPLANE) { - snxtitem_cargo(&ni, EF_PLANE, EF_SHIP, sp->shp_uid); - while (nxtitem(&ni, &plane)) { - pr("\n\t\t\t\t tech %3d %3d%% %s #%d", - plane.pln_tech, - plane.pln_effic, - plchr[(int)plane.pln_type].pl_name, plane.pln_uid); - if (getnuke(nuk_on_plane(&plane), &nuke)) - pr("(%s)", nchr[nuke.nuk_type].n_name); - } - snxtitem_cargo(&ni, EF_LAND, EF_SHIP, sp->shp_uid); - while (nxtitem(&ni, &land)) { - pr("\n\t\t\t\t tech %3d %3d%% %s #%d", - land.lnd_tech, - land.lnd_effic, - lchr[(int)land.lnd_type].l_name, land.lnd_uid); - if (pln_first_on_land(&land) >= 0) { - snxtitem_cargo(&ni, EF_PLANE, EF_LAND, land.lnd_uid); - while (nxtitem(&ni, &plane)) { - pr("\n\t\t\t\t tech %3d %3d%% %s #%d", - plane.pln_tech, - plane.pln_effic, - plchr[(int)plane.pln_type].pl_name, - plane.pln_uid); - if (getnuke(nuk_on_plane(&plane), &nuke)) - pr("(%s)", nchr[nuke.nuk_type].n_name); - } + snxtitem_cargo(&ni, EF_PLANE, EF_SHIP, sp->shp_uid); + while (nxtitem(&ni, &plane)) { + pr("\n\t\t\t\t tech %3d %3d%% %s #%d", + plane.pln_tech, + plane.pln_effic, + plchr[(int)plane.pln_type].pl_name, plane.pln_uid); + if (getnuke(nuk_on_plane(&plane), &nuke)) + pr("(%s)", nchr[nuke.nuk_type].n_name); + } + snxtitem_cargo(&ni, EF_LAND, EF_SHIP, sp->shp_uid); + while (nxtitem(&ni, &land)) { + pr("\n\t\t\t\t tech %3d %3d%% %s #%d", + land.lnd_tech, + land.lnd_effic, + lchr[(int)land.lnd_type].l_name, land.lnd_uid); + if (pln_first_on_land(&land) >= 0) { + snxtitem_cargo(&ni, EF_PLANE, EF_LAND, land.lnd_uid); + while (nxtitem(&ni, &plane)) { + pr("\n\t\t\t\t tech %3d %3d%% %s #%d", + plane.pln_tech, + plane.pln_effic, + plchr[(int)plane.pln_type].pl_name, + plane.pln_uid); + if (getnuke(nuk_on_plane(&plane), &nuke)) + pr("(%s)", nchr[nuke.nuk_type].n_name); } } } @@ -177,18 +175,6 @@ trade_desc(struct trdstr *tp, union empobj_storage *tgp) pr("%c:%d ", ichr[it].i_mnem, lp->lnd_item[it]); } pr("] #%d", tp->trd_unitid); - if (opt_SHOWPLANE) { - snxtitem_cargo(&ni, EF_PLANE, EF_LAND, lp->lnd_uid); - while (nxtitem(&ni, &plane)) { - pr("\n\t\t\t\t tech %3d %3d%% %s #%d", - plane.pln_tech, - plane.pln_effic, - plchr[(int)plane.pln_type].pl_name, plane.pln_uid); - if (getnuke(nuk_on_plane(&plane), &nuke)) - pr("(%s)", nchr[nuke.nuk_type].n_name); - } - } - getsect(lp->lnd_x, lp->lnd_y, §); break; case EF_PLANE: pp = &tgp->plane;