MCPcopy Create free account
hub / github.com/OpenTTD/OpenTTD / CreateGroup

Method CreateGroup

src/script/api/script_group.cpp:34–41  ·  view source on GitHub ↗

static */

Source from the content-addressed store, hash-verified

32}
33
34/* static */ GroupID ScriptGroup::CreateGroup(ScriptVehicle::VehicleType vehicle_type, GroupID parent_group_id)
35{
36 EnforceCompanyModeValid(GROUP_INVALID);
37 if (!ScriptObject::Command<CMD_CREATE_GROUP>::Do(&ScriptInstance::DoCommandReturnGroupID, (::VehicleType)vehicle_type, parent_group_id)) return GROUP_INVALID;
38
39 /* In case of test-mode, we return GroupID 0 */
40 return GroupID::Begin();
41}
42
43/* static */ bool ScriptGroup::DeleteGroup(GroupID group_id)
44{

Callers 2

ini_load.cppFile · 0.80
LoadFromDiskMethod · 0.80

Calls 1

BeginFunction · 0.85

Tested by

no test coverage detected