Handling of goals. More...
#include "stdafx.h"#include "company_func.h"#include "industry.h"#include "town.h"#include "news_func.h"#include "ai/ai.hpp"#include "station_base.h"#include "cargotype.h"#include "strings_func.h"#include "window_func.h"#include "goal_base.h"#include "core/pool_func.hpp"#include "core/random_func.hpp"#include "game/game.hpp"#include "command_func.h"#include "company_base.h"#include "string_func.h"#include "table/strings.h"Go to the source code of this file.
Functions | |
| CommandCost | CmdCreateGoal (TileIndex tile, DoCommandFlag flags, uint32 p1, uint32 p2, const char *text) |
| Create a new goal. | |
| CommandCost | CmdRemoveGoal (TileIndex tile, DoCommandFlag flags, uint32 p1, uint32 p2, const char *text) |
| Remove a goal. | |
Variables | |
| GoalID | _new_goal_id |
| GoalPool | _goal_pool ("Goal") |
Handling of goals.
Definition in file goal.cpp.
| CommandCost CmdCreateGoal | ( | TileIndex | tile, | |
| DoCommandFlag | flags, | |||
| uint32 | p1, | |||
| uint32 | p2, | |||
| const char * | text | |||
| ) |
Create a new goal.
| tile | unused. | |
| flags | type of operation | |
| p1 | various bitstuffed elements
| |
| p2 | GoalTypeID of destination. | |
| text | Text of the goal. |
Definition at line 48 of file goal.cpp.
References _current_company, Pool< Titem, Tindex, Tgrowth_step, Tmax_size, Tpool_type, Tcache, Tzero >::PoolItem<&_goal_pool >::CanAllocateItem(), CMD_ERROR, Goal::company, DC_EXEC, Goal::dst, GB(), GT_COMPANY, GT_INDUSTRY, GT_NONE, GT_TILE, GT_TOWN, Pool< Titem, Tindex, Tgrowth_step, Tmax_size, Tpool_type, Tcache, Tzero >::PoolItem< Tpool >::index, INVALID_COMPANY, InvalidateWindowData(), Pool< Titem, Tindex, Tgrowth_step, Tmax_size, Tpool_type, Tcache, Tzero >::PoolItem<&_town_pool >::IsValidID(), Pool< Titem, Tindex, Tgrowth_step, Tmax_size, Tpool_type, Tcache, Tzero >::PoolItem<&_industry_pool >::IsValidID(), Pool< Titem, Tindex, Tgrowth_step, Tmax_size, Tpool_type, Tcache, Tzero >::PoolItem<&_company_pool >::IsValidID(), IsValidTile(), OWNER_DEITY, StrEmpty(), Goal::text, Goal::type, and WC_GOALS_LIST.
| CommandCost CmdRemoveGoal | ( | TileIndex | tile, | |
| DoCommandFlag | flags, | |||
| uint32 | p1, | |||
| uint32 | p2, | |||
| const char * | text | |||
| ) |
Remove a goal.
| tile | unused. | |
| flags | type of operation | |
| p1 | GoalID to remove. | |
| p2 | unused. | |
| text | unused. |
Definition at line 107 of file goal.cpp.
References _current_company, CMD_ERROR, DC_EXEC, Pool< Titem, Tindex, Tgrowth_step, Tmax_size, Tpool_type, Tcache, Tzero >::PoolItem<&_goal_pool >::Get(), InvalidateWindowData(), Pool< Titem, Tindex, Tgrowth_step, Tmax_size, Tpool_type, Tcache, Tzero >::PoolItem<&_goal_pool >::IsValidID(), OWNER_DEITY, and WC_GOALS_LIST.
1.7.1