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

Method IsValidObjectType

src/script/api/script_objecttype.cpp:21–25  ·  view source on GitHub ↗

static */

Source from the content-addressed store, hash-verified

19#include "../../safeguards.h"
20
21/* static */ bool ScriptObjectType::IsValidObjectType(ObjectType object_type)
22{
23 if (object_type >= ObjectSpec::Count()) return false;
24 return ObjectSpec::Get(object_type)->IsEverAvailable();
25}
26
27/* static */ std::optional<std::string> ScriptObjectType::GetName(ObjectType object_type)
28{

Callers

nothing calls this directly

Calls 1

IsEverAvailableMethod · 0.80

Tested by

no test coverage detected