OpenTTD Source  14.0-beta1
industry_cmd.h
Go to the documentation of this file.
1 /*
2  * This file is part of OpenTTD.
3  * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.
4  * OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
5  * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
6  */
7 
10 #ifndef INDUSTRY_CMD_H
11 #define INDUSTRY_CMD_H
12 
13 #include "command_type.h"
14 #include "company_type.h"
15 #include "industry_type.h"
16 
17 enum IndustryControlFlags : byte;
18 
19 CommandCost CmdBuildIndustry(DoCommandFlag flags, TileIndex tile, IndustryType it, uint32_t first_layout, bool fund, uint32_t seed);
20 CommandCost CmdIndustrySetFlags(DoCommandFlag flags, IndustryID ind_id, IndustryControlFlags ctlflags);
21 CommandCost CmdIndustrySetExclusivity(DoCommandFlag flags, IndustryID ind_id, Owner company_id, bool consumer);
22 CommandCost CmdIndustrySetText(DoCommandFlag flags, IndustryID ind_id, const std::string &text);
23 CommandCost CmdIndustrySetProduction(DoCommandFlag flags, IndustryID ind_id, byte prod_level, bool show_news, const std::string &text);
24 
30 
31 void CcBuildIndustry(Commands cmd, const CommandCost &result, TileIndex tile, IndustryType indtype, uint32_t, bool, uint32_t);
32 
33 #endif /* INDUSTRY_CMD_H */
CcBuildIndustry
void CcBuildIndustry(Commands cmd, const CommandCost &result, TileIndex tile, IndustryType indtype, uint32_t, bool, uint32_t)
Command callback.
Definition: industry_gui.cpp:251
CmdIndustrySetExclusivity
CommandCost CmdIndustrySetExclusivity(DoCommandFlag flags, IndustryID ind_id, Owner company_id, bool consumer)
Change exclusive consumer or supplier for the industry.
Definition: industry_cmd.cpp:2214
CmdIndustrySetText
CommandCost CmdIndustrySetText(DoCommandFlag flags, IndustryID ind_id, const std::string &text)
Change additional industry text.
Definition: industry_cmd.cpp:2243
StrongType::Typedef< uint32_t, struct TileIndexTag, StrongType::Compare, StrongType::Integer, StrongType::Compatible< int32_t >, StrongType::Compatible< int64_t > >
CMD_INDUSTRY_SET_EXCLUSIVITY
@ CMD_INDUSTRY_SET_EXCLUSIVITY
change industry exclusive consumer/supplier
Definition: command_type.h:247
Owner
Owner
Enum for all companies/owners.
Definition: company_type.h:18
DoCommandFlag
DoCommandFlag
List of flags for a command.
Definition: command_type.h:369
CMD_DEITY
@ CMD_DEITY
the command may be executed by COMPANY_DEITY
Definition: command_type.h:400
CMD_INDUSTRY_SET_PRODUCTION
@ CMD_INDUSTRY_SET_PRODUCTION
change industry production
Definition: command_type.h:249
CommandCost
Common return value for all commands.
Definition: command_type.h:23
CMDT_OTHER_MANAGEMENT
@ CMDT_OTHER_MANAGEMENT
Renaming stuff, changing company colours, placing signs, etc.
Definition: command_type.h:414
CMD_INDUSTRY_SET_TEXT
@ CMD_INDUSTRY_SET_TEXT
change additional text for the industry
Definition: command_type.h:248
industry_type.h
command_type.h
CMD_BUILD_INDUSTRY
@ CMD_BUILD_INDUSTRY
build a new industry
Definition: command_type.h:245
CMD_INDUSTRY_SET_FLAGS
@ CMD_INDUSTRY_SET_FLAGS
change industry control flags
Definition: command_type.h:246
CmdIndustrySetFlags
CommandCost CmdIndustrySetFlags(DoCommandFlag flags, IndustryID ind_id, IndustryControlFlags ctlflags)
Set industry control flags.
Definition: industry_cmd.cpp:2134
CmdIndustrySetProduction
CommandCost CmdIndustrySetProduction(DoCommandFlag flags, IndustryID ind_id, byte prod_level, bool show_news, const std::string &text)
Set industry production.
Definition: industry_cmd.cpp:2155
Commands
Commands
List of commands.
Definition: command_type.h:187
CMD_STR_CTRL
@ CMD_STR_CTRL
the command's string may contain control strings
Definition: command_type.h:401
IndustryControlFlags
IndustryControlFlags
Flags to control/override the behaviour of an industry.
Definition: industry.h:44
company_type.h
CmdBuildIndustry
enum IndustryControlFlags byte CommandCost CmdBuildIndustry(DoCommandFlag flags, TileIndex tile, IndustryType it, uint32_t first_layout, bool fund, uint32_t seed)
Build/Fund an industry.
Definition: industry_cmd.cpp:2042
CMDT_LANDSCAPE_CONSTRUCTION
@ CMDT_LANDSCAPE_CONSTRUCTION
Construction and destruction of objects on the map.
Definition: command_type.h:409