From c4c7cac6fece2898776b166e4e68f7b9b49b9f7d Mon Sep 17 00:00:00 2001 From: Markus Armbruster Date: Mon, 5 Jan 2009 10:07:09 +0100 Subject: [PATCH] Check for unit on trading block last in load() and lload() This is to make them more similar, and to get the market code out of the way. --- src/lib/commands/load.c | 30 ++++++++++++++++-------------- 1 file changed, 16 insertions(+), 14 deletions(-) diff --git a/src/lib/commands/load.c b/src/lib/commands/load.c index 79f119e0..0f7f8207 100644 --- a/src/lib/commands/load.c +++ b/src/lib/commands/load.c @@ -116,13 +116,6 @@ load(void) if (!player->owner && (load_unload == UNLOAD)) { continue; } - if (opt_MARKET) { - if (ontradingblock(EF_SHIP, &ship)) { - pr("You cannot load/unload an item on the trading block!\n"); - continue; - } - } - if (ship.shp_own != player->cnum) { if (!noisy) continue; @@ -165,6 +158,14 @@ load(void) xyas(ship.shp_x, ship.shp_y, player->cnum)); continue; } + + if (opt_MARKET) { + if (ontradingblock(EF_SHIP, &ship)) { + pr("You cannot load/unload an item on the trading block!\n"); + continue; + } + } + switch (type) { case EF_PLANE: if (0 != @@ -262,13 +263,6 @@ lload(void) if (sect.sct_own != player->cnum && land.lnd_own != player->cnum) continue; - if (opt_MARKET) { - if (ontradingblock(EF_LAND, &land)) { - pr("You cannot load/unload an item on the trading block!\n"); - continue; - } - } - if (sect.sct_own != player->cnum && load_unload == LOAD) { if (noisy) pr("Sector %s is not yours.\n", @@ -281,6 +275,14 @@ lload(void) xyas(land.lnd_x, land.lnd_y, player->cnum)); continue; } + + if (opt_MARKET) { + if (ontradingblock(EF_LAND, &land)) { + pr("You cannot load/unload an item on the trading block!\n"); + continue; + } + } + switch (type) { case EF_LAND: if (0 !=