I'be started to add season objective at bygfoot ( maybe objective is not the good word).
So I add objective struct which contains two integer, one for the objective type, one for extra data :
Code: Select all
struct _objective {
gint type; /* The objective type */
gint extradata; /* extradata for the objective */
};
And
/**
* Objective for current season
*/
enum
{
OBJ_NONE =0, /**< no Objective */
OBJ_WIN_CUP, /**< Win a cup, extra data contains cup ID */
OBJ_PROMOTED, /**< Promoted */
OBJ_POSITION, /**< Make better than a position, extra data contains position */
OBJ_NO_RELEGATED, /**< Your team must not be relegated */
};
Each time you start the Week 3, new objective are compute.
At this point, I have only implemented simple objective:
I sort all team in current league with the average skill of the team (all player)
- question : how to retrieve how many player in current team, I see only a 20 player in struct team ?-.
After, I have a theoric position of the team so :
- if we are in position 1-3, objective is "to be promoted"
- in the last tree position, the objective is "not relegated"
In other case, it's a "position objective" with the position we compute..
What do you think about this ?
What need to be done : display correctly objective compute (at this stage, it display the text with show_popup_message), add info in save file, and compute a cup objective, check if the objective is ok or not at end?
Do i continue to work on it ?