[Add] Commodity land mission checks.
This commit is contained in:
parent
85d084063a
commit
7bf8d63e00
@ -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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -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;
|
||||||
}
|
}
|
||||||
|
@ -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))
|
||||||
|
Loading…
Reference in New Issue
Block a user