[Add] Commodity land mission checks.

This commit is contained in:
Allanis 2013-11-07 23:10:01 +00:00
parent 85d084063a
commit 7bf8d63e00
3 changed files with 6 additions and 1 deletions

View File

@ -164,10 +164,13 @@ static void commodity_exchange_open(void) {
COMMODITY_HEIGHT-80-BUTTON_HEIGHT, "lstGoods", COMMODITY_HEIGHT-80-BUTTON_HEIGHT, "lstGoods",
goods, land_planet->ncommodities, 0, commodity_update); goods, land_planet->ncommodities, 0, commodity_update);
/* Update. */
commodity_update(NULL); commodity_update(NULL);
/* Check commodity exchange missions. */
if(!has_visited(VISITED_COMMODITY)) { if(!has_visited(VISITED_COMMODITY)) {
/* @todo Mission check. */ /*missions_run(MIS_AVAIL_COMMODITY, land_planet->faction,
land_planet->name, cur_system->name);*/
visited(VISITED_COMMODITY); visited(VISITED_COMMODITY);
} }
} }

View File

@ -394,6 +394,7 @@ static int mission_location(char* loc) {
else if(strcmp(loc, "Outfit")==0) return MIS_AVAIL_OUTFIT; else if(strcmp(loc, "Outfit")==0) return MIS_AVAIL_OUTFIT;
else if(strcmp(loc, "Shipyard")==0) return MIS_AVAIL_SHIPYARD; else if(strcmp(loc, "Shipyard")==0) return MIS_AVAIL_SHIPYARD;
else if(strcmp(loc, "Land")==0) return MIS_AVAIL_LAND; else if(strcmp(loc, "Land")==0) return MIS_AVAIL_LAND;
else if(strcmp(loc, "Commodity")==0) return MIS_AVAIL_COMMODITY;
return -1; return -1;
} }

View File

@ -8,6 +8,7 @@
#define MIS_AVAIL_OUTFIT 3 #define MIS_AVAIL_OUTFIT 3
#define MIS_AVAIL_SHIPYARD 4 #define MIS_AVAIL_SHIPYARD 4
#define MIS_AVAIL_LAND 5 #define MIS_AVAIL_LAND 5
#define MIS_AVAIL_COMMODITY 6 /**< Mission is available at commodity exchange. */
/* Flags. */ /* Flags. */
#define mis_isFlag(m,f) ((m)->flags & (f)) #define mis_isFlag(m,f) ((m)->flags & (f))