Module:API/CustomTags

-- -- API Custom Tags -- Author: CloneTrooper1019 -- -- The idea here is that we can add custom tags to certain classes, to help better organize more important information on the wiki. -- Obviously these won't work unless the Module:API actually reads whats on here, and makes adjustments based on the tags. --

customTags = {   -- Classes marked as "abstract" cannot be created, and serve as abstract classes which are inherited by multiple classes. abstract = {       "Instance"; "BasePlayerGui"; "BodyMover"; "CharacterAppearance"; "Clothing"; "DataModelMesh"; "BevelMesh"; "FaceInstance"; "Feature"; "GuiBase"; "GuiBase2d"; "GuiButton"; "GuiObject"; "GuiLabel"; "LayerCollector"; "GuiBase3d"; "PVAdornment"; "HandleAdornment"; "PartAdornment"; "SelectionLasso"; "GuiItem"; "BackpackItem"; "JointInstance"; "DynamicRotate"; "ManualSurfaceJointInstance"; "Light"; "LuaSourceContainer"; "BaseScript"; "NetworkPeer"; "PVInstance"; "BasePart"; "FormFactorPart"; "PartOperation"; "RootInstance"; "ServiceProvider"; "GenericSettings"; "HandlesBase"; "Pages"; "NetworkReplicator"; "ReflectionMetadataItem"; "Constraint"; "PostEffect"; "RbxLibrary"; "SoundEffect"; "UIBase"; "UIComponent"; "UIConstraint"; "UILayout"; };

-- Classes marked as "internal" are classes that are of no signifiant use to developers. internal = {       "CacheableContentProvider"; "ContentFilter"; "Controller"; "CookiesService"; "CSGDictionaryService"; "FlyweightService"; "FlagStandService"; "FriendService"; "FunctionalTest"; "GamepadService"; "Scale9Frame"; "HttpRbxApiService"; "LoginService"; "MeshContentProvider"; "NonReplicatedCSGDictionaryService"; "NotificationService"; "PrismPart"; "PyramidPart"; "PhysicsService"; "ParallelRampPart"; "RightAngleRampPart"; "PersonalServerService"; "RenderHooksService"; "ScriptInformationProvider"; "SocialService"; "SolidModelContentProvider"; "Stats"; "Status"; "StatsItem"; "ProfilingItem"; "TaskScheduler"; "TimerService"; "TouchTransmitter"; "VirtualUser"; "Visit"; -- These objects try to load, but get removed by something else that I'm unaware of. -- Just block them from trying to load in the first place? "AdvancedDragger"; "BinaryStringValue"; "ChatFilter"; "ClusterPacketCache"; "ControllerService"; "Geometry"; "ButtonBindingWidget"; "GuiRoot"; "Hopper"; "GuidRegistryService"; "InstancePacketCache"; "LocalWorkspace"; "LuaWebService"; "OneQuarterClusterPacketCacheBase"; "PartOperationAsset"; "PhysicsPacketCache"; "RobloxReplicatedStorage"; "RuntimeScriptService"; "ScriptService"; "SpawnerService"; "TouchInputService"; "TweenService";

"AnalyticsService"; "LobbyService"; "ThirdPartyUserService"; };

-- Classes marked with "noInheritance" won't show inheritance from the Instance class. -- This should only be services which don't hold children, or classes that can only be created through a method return. noInheritance = {       "AdService"; "AnimationTrack"; "AssetService"; "BadgeService"; "Button"; "ChangeHistoryService"; "Chat"; "CollectionService"; "ContextActionService"; "DataStoreService"; "Debris"; "GamePassService"; "GlobalDataStore"; "GroupService"; "GuiService"; "HttpService"; "InputObject"; "KeyframeSequenceProvider"; "LogService"; "LuaSettings"; "MarketplaceService"; "Mouse"; "NetworkMarker"; "OrderedDataStore"; "Pages"; "Path"; "PathfindingService"; "Players"; "Plugin"; "PluginManager"; "PointsService"; "RunService"; "Selection"; "ServiceProvider"; "SoundService"; "Teams"; "Terrain"; "TeleportService"; "Toolbar"; "UserInputService"; "DebugSettings"; "GameSettings"; "LuaSettings"; "NetworkSettings"; "PhysicsSettings"; "RenderSettings"; "UserGameSettings"; };   -- Classes marked with "pluginLevel" will show members marked with PluginSecurity in the non-hidden category. pluginLevel = {       "ChangeHistoryService"; "Plugin"; "Toolbar"; "Button"; "PluginManager"; "Selection"; };   -- Classes marked as "settings" are singleton classes that are used to store persistent settings in Roblox. -- (couldn't we just check if the class name has "Settings" in it?) settings = {       "DebugSettings"; "GameSettings"; "LuaSettings"; "NetworkSettings"; "PhysicsSettings"; "RenderSettings"; "GlobalSettings"; "UserSettings"; "UserGameSettings"; "AnalysticsSettings"; };

-- Classes marked as "service" are top-level singleton classes in the DataModel. -- (we can't include all classes with "Service" in their name because of "ServiceProvider") service = {       "AdService"; "AssetService"; "BadgeService"; "ChangeHistoryService"; "CollectionService"; "ContextActionService"; "ControllerService"; "CookiesService"; "DataStoreService"; "FlagStandService"; "FlyweightService"; "CSGDictionaryService"; "NonReplicatedCSGDictionaryService"; "FriendService"; "GamePassService"; "GamepadService"; "GroupService"; "GuiService"; "GuidRegistryService"; "HapticService"; "HttpRbxApiService"; "HttpService"; "InsertService"; "JointsService"; "LogService"; "LoginService"; "LuaWebService"; "MarketplaceService"; "NotificationService"; "PathfindingService"; "PersonalServerService"; "PhysicsService"; "PointsService"; "RenderHooksService"; "RunService"; "RuntimeScriptService"; "ScriptService"; "ServerScriptService"; "SocialService"; "SoundService"; "SpawnerService"; "TeleportService"; "TestService"; "TextService"; "TimerService"; "TouchInputService"; "TweenService"; "UserInputService"; "Workspace"; "ContentProvider"; "ContentFilter"; "KeyframeSequenceProvider"; "Chat"; "Players"; "ReplicatedFirst"; "StarterPlayer"; "StarterPack"; "StarterGui"; "Geometry"; "Debris"; "ScriptInformationProvider"; "Selection"; "ServerStorage"; "ReplicatedStorage"; "MeshContentProvider"; "SolidModelContentProvider"; "Lighting"; "ScriptContext"; "Teams"; "VirtualUser"; "Visit"; "Stats"; "GuiRoot"; "CoreGui"; "RobloxReplicatedStorage"; "NetworkServer"; "NetworkClient"; "OneQuarterClusterPacketCacheBase"; "ClusterPacketCache"; "PhysicsPacketCache"; "InstancePacketCache"; "VRService"; "AnalyticsService"; "LobbyService"; "ThirdPartyUserService"; };

-- Classes that aren't internal, but regardless shouldn't be shown on the API reference. dontShowOnApiRef = {       "GuiMain"; "Platform"; "ReflectionMetadataCallbacks"; "ReflectionMetadataClasses"; "ReflectionMetadataEnums"; "ReflectionMetadataEvents"; "ReflectionMetadataFunctions"; "ReflectionMetadataClass"; "ReflectionMetadataEnum"; "ReflectionMetadataEnumItem"; "ReflectionMetadataMember"; "ReflectionMetadataProperties"; "ReflectionMetadataYieldFunctions"; "ReflectionMetadataItem"; "Status"; "AdService"; "FormFactorPart"; "ParabolaAdornment"; };

noChildrenModifiers = {       "PostEffect"; "BloomEffect"; "BlurEffect"; "ColorCorrectionEffect"; "SunRaysEffect"; } }

-- Custom Icons: -- Forces a class to over-ride their class icon. -- Usage: -- * Add a table whose key is either the "File:FileName.png" directory, or the name of the class with the icon. -- * Add classes to this list which should use the icon.

customIcons = {   Keyframe = {       "KeyframeSequence"; "KeyframeSequenceProvider"; "Animator"; };   ClickDetector = {       "InputObject"; "ContextActionService"; "Dragger"; };   SpecialMesh = "FileMesh"; ServerStorage = {       "ChangeHistoryService"; "DataStoreService"; "GlobalDataStore"; "OrderedDataStore"; };   SurfaceSelection = "Selection"; ReplicatedStorage = {       "ContentProvider"; "AssetService"; "InsertService"; };   Players = "GroupService"; ImageLabel = "Button"; BindableFunction = "RunService"; ClientReplicator = "NetworkMarker"; Workspace = "GamePassService"; SelectionBox = {       "BoxHandleAdornment"; "ConeHandleAdornment"; "CylinderHandleAdornment"; "ImageHandleAdornment"; "LineHandleAdornment"; "SphereHandleAdornment"; };   ModuleScript = "ScriptDebugger"; Debris = "CollectionService"; Weld = "JointsService"; TextLabel = "TextService"; ForceField = {       "Path"; "PathfindingService"; };   Message = "Chat"; PlayerScripts = "ScriptContext"; Attachment = {        "Plugin"; "PluginManager"; };   HopperBin = "RbxUtility"; = "Toolbar"; = "PointsService"; = "AdService"; =    {        "DataStorePages"; "FriendPages"; "StandardPages"; "ReflectionMetadata"; "ReflectionMetadataCallbacks"; "ReflectionMetadataClasses"; "ReflectionMetadataEnums"; "ReflectionMetadataEvents"; "ReflectionMetadataFunctions"; "ReflectionMetadataClass"; "ReflectionMetadataEnum"; "ReflectionMetadataEnumItem"; "ReflectionMetadataMember"; "ReflectionMetadataProperties"; "ReflectionMetadataYieldFunctions"; };    = "LogService"; =    {        "Mouse"; "PlayerMouse"; "PluginMouse"; };    =     {        "UserInputService"; "HapticService"; };    = "HttpService"; = "TeleportService"; = "BadgeService"; = "DataModel"; = "Hole"; = "CoreScript"; = "MotorFeature"; =    {        "GuiService"; "RbxGui"; };    = "RbxStamper"; = "DebuggerWatch"; = "DebuggerBreakpoint"; = "DebuggerManager"; = "VRService"; = -- NOTE: Temporary {       "MoveToConstraint"; "CylindricalConstraint"; "SlidingBallConstraint"; };    = "MarketplaceService"; = "GoogleAnalyticsConfiguration"; }

-- -- Basic Public API -- local api = {} local infoCache = {} local iconOverride = {}

for tag,data in pairs(customTags) do   for _,class in pairs(data) do        local ref = infoCache[class] if not ref then ref = {} infoCache[class] = ref end ref[tag] = true; end end

for classIcon,classes in pairs(customIcons) do   if type(classes) == "string" then iconOverride[classes] = classIcon; else for _,class in pairs(classes) do           iconOverride[class] = classIcon; end end end

function api:ClassHasTag(class,tag) local classCache = infoCache[class] if classCache then return classCache[tag] or false end return false end

function api:GetTags(class) return infoCache[class] or {} end

function api:EachTag(class) local tags = self:GetTags(class) local ind return function ind = next(tags,ind) if ind then return tags[ind] end end end

function api:GetOverrideIcon(class) return iconOverride[class] end

return api