leper
84674911cc
This removes FindAllPlaceableTemplates, replaces the few uses of it by FindAllTemplates, and makes that ignore all templates starting with special/ in addition to those starting with template_. Now modders can use entirely different template organization schemes (more folders, different folders, etc) without having to edit a file that was never well documented. In conjunction with a few of the template moving patches preceding this rubble/ and other/catafalque are now placeable. The former now does not decay anymore and users that want that should use the decay| filter, the latter will be taken care of in #4762. Return to making FindAllTemplates return all placeable templates again (switch to unplaceable filter). To reiterate the main point: Only templates starting with special/ or template_ will not show up as placeable in Atlas (or show up to code querying for all (placeable) templates. If you want to add more of those use one of these naming schemes (and possibly subfolders in special/). Reviewed By: fatherbushido Differential Revision: https://code.wildfiregames.com/D935 This was SVN commit r20246.
32 lines
1.6 KiB
C++
32 lines
1.6 KiB
C++
/* Copyright (C) 2017 Wildfire Games.
|
|
* This file is part of 0 A.D.
|
|
*
|
|
* 0 A.D. 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, either version 2 of the License, or
|
|
* (at your option) any later version.
|
|
*
|
|
* 0 A.D. 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. See the
|
|
* GNU General Public License for more details.
|
|
*
|
|
* You should have received a copy of the GNU General Public License
|
|
* along with 0 A.D. If not, see <http://www.gnu.org/licenses/>.
|
|
*/
|
|
|
|
#include "precompiled.h"
|
|
|
|
#include "ICmpTemplateManager.h"
|
|
|
|
#include "simulation2/system/InterfaceScripted.h"
|
|
|
|
BEGIN_INTERFACE_WRAPPER(TemplateManager)
|
|
DEFINE_INTERFACE_METHOD_1("GetTemplate", const CParamNode*, ICmpTemplateManager, GetTemplate, std::string)
|
|
DEFINE_INTERFACE_METHOD_1("GetTemplateWithoutValidation", const CParamNode*, ICmpTemplateManager, GetTemplateWithoutValidation, std::string)
|
|
DEFINE_INTERFACE_METHOD_CONST_1("TemplateExists", bool, ICmpTemplateManager, TemplateExists, std::string)
|
|
DEFINE_INTERFACE_METHOD_CONST_1("GetCurrentTemplateName", std::string, ICmpTemplateManager, GetCurrentTemplateName, entity_id_t)
|
|
DEFINE_INTERFACE_METHOD_CONST_1("FindAllTemplates", std::vector<std::string>, ICmpTemplateManager, FindAllTemplates, bool)
|
|
DEFINE_INTERFACE_METHOD_CONST_1("GetEntitiesUsingTemplate", std::vector<entity_id_t>, ICmpTemplateManager, GetEntitiesUsingTemplate, std::string)
|
|
END_INTERFACE_WRAPPER(TemplateManager)
|