OpenTTD Source 20250312-master-gcdcc6b491d
engine_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 ENGINE_CMD_H
11#define ENGINE_CMD_H
12
13#include "command_type.h"
14
16CommandCost CmdEngineCtrl(DoCommandFlags flags, EngineID engine_id, CompanyID company_id, bool allow);
17CommandCost CmdRenameEngine(DoCommandFlags flags, EngineID engine_id, const std::string &text);
19
24
25#endif /* ENGINE_CMD_H */
Common return value for all commands.
Enum-as-bit-set wrapper.
Types related to commands.
@ CMDT_COMPANY_SETTING
Changing settings related to a company.
@ CMDT_VEHICLE_MANAGEMENT
Stopping, starting, sending to depot, turning around, replace orders etc.
@ CMDT_OTHER_MANAGEMENT
Renaming stuff, changing company colours, placing signs, etc.
@ Deity
the command may be executed by COMPANY_DEITY
@ Server
the command can only be initiated by the server
@ CMD_WANT_ENGINE_PREVIEW
confirm the preview of an engine
@ CMD_ENGINE_CTRL
control availability of the engine for companies
@ CMD_SET_VEHICLE_VISIBILITY
hide or unhide a vehicle in the build vehicle and autoreplace GUIs
@ CMD_RENAME_ENGINE
rename a engine (in the engine list)
CommandCost CmdRenameEngine(DoCommandFlags flags, EngineID engine_id, const std::string &text)
Rename an engine.
Definition engine.cpp:1221
CommandCost CmdWantEnginePreview(DoCommandFlags flags, EngineID engine_id)
Accept an engine prototype.
Definition engine.cpp:1040
CommandCost CmdEngineCtrl(DoCommandFlags flags, EngineID engine_id, CompanyID company_id, bool allow)
Allow or forbid a specific company to use an engine.
Definition engine.cpp:1058
CommandCost CmdSetVehicleVisibility(DoCommandFlags flags, EngineID engine_id, bool hide)
Set the visibility of an engine.
Definition engine.cpp:1019