Update: Translations from eints
[openttd-github.git] / src / script / api / script_grouplist.cpp
blob363b4d9f53b9e9b1ed008a24a2bbfcee0a1aa242
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 */
8 /** @file script_grouplist.cpp Implementation of ScriptGroupList and friends. */
10 #include "../../stdafx.h"
11 #include "script_grouplist.hpp"
12 #include "script_error.hpp"
13 #include "../../group.h"
15 #include "../../safeguards.h"
17 ScriptGroupList::ScriptGroupList(HSQUIRRELVM vm)
19 EnforceCompanyModeValid_Void();
20 CompanyID owner = ScriptObject::GetCompany();
21 ScriptList::FillList<Group>(vm, this,
22 [owner](const Group *g) { return g->owner == owner; }