OpenTTD Source 20250312-master-gcdcc6b491d
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#include "industry.h"
17
18CommandCost CmdBuildIndustry(DoCommandFlags flags, TileIndex tile, IndustryType it, uint32_t first_layout, bool fund, uint32_t seed);
20CommandCost CmdIndustrySetExclusivity(DoCommandFlags flags, IndustryID ind_id, Owner company_id, bool consumer);
22CommandCost CmdIndustrySetProduction(DoCommandFlags flags, IndustryID ind_id, uint8_t prod_level, bool show_news, const EncodedString &text);
23
29
30void CcBuildIndustry(Commands cmd, const CommandCost &result, TileIndex tile, IndustryType indtype, uint32_t, bool, uint32_t);
31
32#endif /* INDUSTRY_CMD_H */
Common return value for all commands.
Container for an encoded string, created by GetEncodedString.
Enum-as-bit-set wrapper.
Types related to commands.
@ CMDT_LANDSCAPE_CONSTRUCTION
Construction and destruction of objects on the map.
@ CMDT_OTHER_MANAGEMENT
Renaming stuff, changing company colours, placing signs, etc.
@ Deity
the command may be executed by COMPANY_DEITY
@ StrCtrl
the command's string may contain control strings
Commands
List of commands.
@ CMD_INDUSTRY_SET_FLAGS
change industry control flags
@ CMD_INDUSTRY_SET_TEXT
change additional text for the industry
@ CMD_INDUSTRY_SET_EXCLUSIVITY
change industry exclusive consumer/supplier
@ CMD_INDUSTRY_SET_PRODUCTION
change industry production
@ CMD_BUILD_INDUSTRY
build a new industry
Types related to companies.
Base of all industries.
CommandCost CmdIndustrySetExclusivity(DoCommandFlags flags, IndustryID ind_id, Owner company_id, bool consumer)
Change exclusive consumer or supplier for the industry.
void CcBuildIndustry(Commands cmd, const CommandCost &result, TileIndex tile, IndustryType indtype, uint32_t, bool, uint32_t)
Command callback.
CommandCost CmdBuildIndustry(DoCommandFlags flags, TileIndex tile, IndustryType it, uint32_t first_layout, bool fund, uint32_t seed)
Build/Fund an industry.
CommandCost CmdIndustrySetFlags(DoCommandFlags flags, IndustryID ind_id, IndustryControlFlags ctlflags)
Set industry control flags.
CommandCost CmdIndustrySetProduction(DoCommandFlags flags, IndustryID ind_id, uint8_t prod_level, bool show_news, const EncodedString &text)
Set industry production.
CommandCost CmdIndustrySetText(DoCommandFlags flags, IndustryID ind_id, const EncodedString &text)
Change additional industry text.
Types related to the industry.
Templated helper to make a PoolID a single POD value.
Definition pool_type.hpp:43