Module:Superclass

local utils = require('Module:Utils') local get_class_icon = require('Module:Class icon')._class_icon local tags = require('Module:Tags') local p = {}

local function make_class_link(classname, icon) local class_link = "" if tags.class_has_tag(classname, 'deprecated') then class_link = " " .. class_link .. " "   end if icon then return icon .. class_link else return class_link end end

function p._class_link(args) return make_class_link(args.class, get_class_icon(args)) end

p.class_link = utils.make_wrapper_function(p._class_link)

function p._class_link_with_fallback_icon(args) return make_class_link(args.class, get_class_icon(args) or '') end

p.class_link_with_fallback_icon = utils.make_wrapper_function(p._class_link_with_fallback_icon)

function p._superclass(args) return p.data[args.class] end

p.superclass = utils.make_wrapper_function(p._superclass)

function p._superclass_level(args) if args.level == "0" then return args.class else local current_superclass = args.class for i = 1, tonumber(args.level) do           current_superclass = p.data[current_superclass] end return current_superclass end end

p.superclass_level = utils.make_wrapper_function(p._superclass_level)

function p._superclass_list(args) local list = '' local current_superclass = p.data[args.class] while current_superclass do       list = list .. "\n\n" .. p._class_link {class = current_superclass} current_superclass = p.data[current_superclass] end return list end

p.superclass_list = utils.make_wrapper_function(p._superclass_list)

function p._subclass_tree(args) local list = '' for class, superclass in pairs(p.data) do       if superclass == args.class then list = list .. '' .. p._class_link_with_fallback_icon{class = class} .. p._subclass_tree{class = class} .. '' end end if list ~= '' then return '' .. list .. '' end return list end

p.subclass_tree = utils.make_wrapper_function(p._subclass_tree)

function p._class_reference return '' .. p._class_link_with_fallback_icon{class = 'Instance'} .. p._subclass_tree{class = 'Instance'} .. '' end

p.class_reference = utils.make_wrapper_function(p._class_reference)

p.data = { Accoutrement = 'Instance'; Accessory = 'Accoutrement'; Hat = 'Accoutrement'; AdService = 'Instance'; AdvancedDragger = 'Instance'; AnalyticsService = 'Instance'; Animation = 'Instance'; AnimationController = 'Instance'; AnimationTrack = 'Instance'; Animator = 'Instance'; AssetService = 'Instance'; Attachment = 'Instance'; BadgeService = 'Instance'; BasePlayerGui = 'Instance'; CoreGui = 'BasePlayerGui'; PlayerGui = 'BasePlayerGui'; StarterGui = 'BasePlayerGui'; BinaryStringValue = 'Instance'; BindableEvent = 'Instance'; BindableFunction = 'Instance'; BodyMover = 'Instance'; BodyAngularVelocity = 'BodyMover'; BodyForce = 'BodyMover'; BodyGyro = 'BodyMover'; BodyPosition = 'BodyMover'; BodyThrust = 'BodyMover'; BodyVelocity = 'BodyMover'; PluginGuiService = 'Instance'; RocketPropulsion = 'BodyMover'; BoolValue = 'Instance'; PathWaypoint = 'Instance'; BrickColorValue = 'Instance'; Button = 'Instance'; CFrameValue = 'Instance'; TweenBase = 'Instance'; Tween = 'TweenBase'; Beam = 'Instance'; CacheableContentProvider = 'Instance'; MeshContentProvider = 'CacheableContentProvider'; SolidModelContentProvider = 'CacheableContentProvider'; TextureContentProvider = 'CacheableContentProvider'; Camera = 'Instance'; ChangeHistoryService = 'Instance'; CharacterAppearance = 'Instance'; BodyColors = 'CharacterAppearance'; CharacterMesh = 'CharacterAppearance'; Clothing = 'CharacterAppearance'; Pants = 'Clothing'; Shirt = 'Clothing'; ShirtGraphic = 'CharacterAppearance'; Skin = 'CharacterAppearance'; Chat = 'Instance'; ChatFilter = 'Instance'; ClickDetector = 'Instance'; CollectionService = 'Instance'; Color3Value = 'Instance'; Configuration = 'Instance'; Constraint = 'Instance'; AlignOrientation = 'Constraint'; AlignPosition = 'Constraint'; BallSocketConstraint = 'Constraint'; VirtualInputManager = 'Instance'; HingeConstraint = 'Constraint'; LineForce = 'Constraint'; RodConstraint = 'Constraint'; RopeConstraint = 'Constraint'; SlidingBallConstraint = 'Constraint'; CylindricalConstraint = 'SlidingBallConstraint'; PrismaticConstraint = 'SlidingBallConstraint'; SpringConstraint = 'Constraint'; Torque = 'Constraint'; VectorForce = 'Constraint'; ContentProvider = 'Instance'; ContextActionService = 'Instance'; Controller = 'Instance'; HumanoidController = 'Controller'; SkateboardController = 'Controller'; VehicleController = 'Controller'; ControllerService = 'Instance'; CookiesService = 'Instance'; CustomEvent = 'Instance'; CustomEventReceiver = 'Instance'; DataModelMesh = 'Instance'; BevelMesh = 'DataModelMesh'; BlockMesh = 'BevelMesh'; CylinderMesh = 'BevelMesh'; FileMesh = 'DataModelMesh'; SpecialMesh = 'FileMesh'; DataStoreService = 'Instance'; Debris = 'Instance'; DebugSettings = 'Instance'; DebuggerBreakpoint = 'Instance'; DebuggerManager = 'Instance'; DebuggerWatch = 'Instance'; Dialog = 'Instance'; DialogChoice = 'Instance'; DoubleConstrainedValue = 'Instance'; Dragger = 'Instance'; Explosion = 'Instance'; FaceInstance = 'Instance'; Decal = 'FaceInstance'; Texture = 'Decal'; Feature = 'Instance'; Hole = 'Feature'; MotorFeature = 'Feature'; Fire = 'Instance'; FlagStandService = 'Instance'; FlyweightService = 'Instance'; CSGDictionaryService = 'FlyweightService'; NonReplicatedCSGDictionaryService = 'FlyweightService'; Folder = 'Instance'; ForceField = 'Instance'; FriendService = 'Instance'; FunctionalTest = 'Instance'; GamePassService = 'Instance'; GameSettings = 'Instance'; GamepadService = 'Instance'; Geometry = 'Instance'; GlobalDataStore = 'Instance'; OrderedDataStore = 'GlobalDataStore'; GoogleAnalyticsConfiguration = 'Instance'; GroupService = 'Instance'; GuiBase = 'Instance'; GuiBase2d = 'GuiBase'; GuiObject = 'GuiBase2d'; Frame = 'GuiObject'; GuiButton = 'GuiObject'; ImageButton = 'GuiButton'; TextButton = 'GuiButton'; GuiLabel = 'GuiObject'; ImageLabel = 'GuiLabel'; TextLabel = 'GuiLabel'; Scale9Frame = 'GuiObject'; ScrollingFrame = 'GuiObject'; TextBox = 'GuiObject'; LayerCollector = 'GuiBase2d'; BillboardGui = 'LayerCollector'; ScreenGui = 'LayerCollector'; GuiMain = 'ScreenGui'; SurfaceGui = 'LayerCollector'; PluginGui = 'LayerCollector'; GuiBase3d = 'GuiBase'; FloorWire = 'GuiBase3d'; Translator = 'Instance'; PVAdornment = 'GuiBase3d'; HandleAdornment = 'PVAdornment'; BoxHandleAdornment = 'HandleAdornment'; ConeHandleAdornment = 'HandleAdornment'; CylinderHandleAdornment = 'HandleAdornment'; ImageHandleAdornment = 'HandleAdornment'; LineHandleAdornment = 'HandleAdornment'; SphereHandleAdornment = 'HandleAdornment'; ParabolaAdornment = 'PVAdornment'; SelectionBox = 'PVAdornment'; SelectionSphere = 'PVAdornment'; PartAdornment = 'GuiBase3d'; HandlesBase = 'PartAdornment'; ArcHandles = 'HandlesBase'; Handles = 'HandlesBase'; SurfaceSelection = 'PartAdornment'; SelectionLasso = 'GuiBase3d'; SelectionPartLasso = 'SelectionLasso'; SelectionPointLasso = 'SelectionLasso'; TextureTrail = 'GuiBase3d'; Trail = "Instance"; GuiItem = 'Instance'; Backpack = 'GuiItem'; BackpackItem = 'GuiItem'; HopperBin = 'BackpackItem'; Tool = 'BackpackItem'; Flag = 'Tool'; ButtonBindingWidget = 'GuiItem'; GuiRoot = 'GuiItem'; Hopper = 'GuiItem'; StarterPack = 'GuiItem'; GuiService = 'Instance'; GuidRegistryService = 'Instance'; HapticService = 'Instance'; HttpRbxApiService = 'Instance'; HttpService = 'Instance'; Humanoid = 'Instance'; InputObject = 'Instance'; InsertService = 'Instance'; InstancePacketCache = 'Instance'; IntConstrainedValue = 'Instance'; IntValue = 'Instance'; InventoryPages = 'Pages'; JointInstance = 'Instance'; DynamicRotate = 'JointInstance'; RotateP = 'DynamicRotate'; RotateV = 'DynamicRotate'; Glue = 'JointInstance'; ManualSurfaceJointInstance = 'JointInstance'; ManualGlue = 'ManualSurfaceJointInstance'; ManualWeld = 'ManualSurfaceJointInstance'; Motor = 'JointInstance'; Motor6D = 'Motor'; Rotate = 'JointInstance'; Snap = 'JointInstance'; VelocityMotor = 'JointInstance'; Weld = 'JointInstance'; JointsService = 'Instance'; Keyframe = 'Instance'; KeyframeSequence = 'Instance'; KeyframeSequenceProvider = 'Instance'; Light = 'Instance'; PointLight = 'Light'; SpotLight = 'Light'; SurfaceLight = 'Light'; Lighting = 'Instance'; LobbyService = 'Instance'; LocalWorkspace = 'Instance'; LocalizationService = 'Instance'; LocalizationTable = 'Instance'; LogService = 'Instance'; LoginService = 'Instance'; LuaSettings = 'Instance'; LuaSourceContainer = 'Instance'; BaseScript = 'LuaSourceContainer'; CoreScript = 'BaseScript'; Script = 'BaseScript'; LocalScript = 'Script'; ModuleScript = 'LuaSourceContainer'; LuaWebService = 'Instance'; MarketplaceService = 'Instance'; Message = 'Instance'; Hint = 'Message'; Mouse = 'Instance'; NavigationService = 'Instance'; NavigationPath = 'Instance'; NavigationWaypoint = 'Instance'; PlayerMouse = 'Mouse'; PluginMouse = 'Mouse'; NetworkMarker = 'Instance'; NetworkPeer = 'Instance'; NetworkClient = 'NetworkPeer'; NetworkServer = 'NetworkPeer'; NetworkReplicator = 'Instance'; ClientReplicator = 'NetworkReplicator'; ServerReplicator = 'NetworkReplicator'; NetworkSettings = 'Instance'; NotificationService = 'Instance'; NumberValue = 'Instance'; ObjectValue = 'Instance'; OneQuarterClusterPacketCacheBase = 'Instance'; PVInstance = 'Instance'; BasePart = 'PVInstance'; CornerWedgePart = 'BasePart'; FormFactorPart = 'BasePart'; Part = 'FormFactorPart'; FlagStand = 'Part'; Platform = 'Part'; Seat = 'Part'; SkateboardPlatform = 'Part'; SpawnLocation = 'Part'; WedgePart = 'FormFactorPart'; MeshPart = 'BasePart'; ParallelRampPart = 'BasePart'; PartOperation = 'BasePart'; NegateOperation = 'PartOperation'; UnionOperation = 'PartOperation'; PrismPart = 'BasePart'; PyramidPart = 'BasePart'; RightAngleRampPart = 'BasePart'; Terrain = 'BasePart'; TrussPart = 'BasePart'; VehicleSeat = 'BasePart'; Model = 'PVInstance'; RootInstance = 'Model'; Workspace = 'RootInstance'; Status = 'Model'; Pages = 'Instance'; DataStorePages = 'Pages'; FriendPages = 'Pages'; StandardPages = 'Pages'; PartOperationAsset = 'Instance'; ParticleEmitter = 'Instance'; Path = 'Instance'; PathfindingService = 'Instance'; PersonalServerService = 'Instance'; PhysicsPacketCache = 'Instance'; PhysicsService = 'Instance'; PhysicsSettings = 'Instance'; Player = 'Instance'; PlayerScripts = 'Instance'; Players = 'Instance'; Plugin = 'Instance'; PluginManager = 'Instance'; PointsService = 'Instance'; Pose = 'Instance'; PostEffect = 'Instance'; BloomEffect = 'PostEffect'; BlurEffect = 'PostEffect'; ColorCorrectionEffect = 'PostEffect'; SunRaysEffect = 'PostEffect'; RayValue = 'Instance'; ReflectionMetadata = 'Instance'; ReflectionMetadataCallbacks = 'Instance'; ReflectionMetadataClasses = 'Instance'; ReflectionMetadataEnums = 'Instance'; ReflectionMetadataEvents = 'Instance'; ReflectionMetadataFunctions = 'Instance'; ReflectionMetadataItem = 'Instance'; ReflectionMetadataClass = 'ReflectionMetadataItem'; ReflectionMetadataEnum = 'ReflectionMetadataItem'; ReflectionMetadataEnumItem = 'ReflectionMetadataItem'; ReflectionMetadataMember = 'ReflectionMetadataItem'; ReflectionMetadataProperties = 'Instance'; ReflectionMetadataYieldFunctions = 'Instance'; RemoteEvent = 'Instance'; RemoteFunction = 'Instance'; RenderHooksService = 'Instance'; RenderSettings = 'Instance'; ReplicatedFirst = 'Instance'; ReplicatedStorage = 'Instance'; RobloxReplicatedStorage = 'Instance'; RunService = 'Instance'; RuntimeScriptService = 'Instance'; ScriptContext = 'Instance'; ScriptDebugger = 'Instance'; ScriptService = 'Instance'; Selection = 'Instance'; ServerScriptService = 'Instance'; ServerStorage = 'Instance'; ServiceProvider = 'Instance'; DataModel = 'ServiceProvider'; GenericSettings = 'ServiceProvider'; AnalysticsSettings = 'GenericSettings'; GlobalSettings = 'GenericSettings'; UserSettings = 'GenericSettings'; Sky = 'Instance'; Smoke = 'Instance'; Sound = 'Instance'; SoundEffect = 'Instance'; ChorusSoundEffect = 'SoundEffect'; CompressorSoundEffect = 'SoundEffect'; DistortionSoundEffect = 'SoundEffect'; EchoSoundEffect = 'SoundEffect'; EqualizerSoundEffect = 'SoundEffect'; FlangeSoundEffect = 'SoundEffect'; PitchShiftSoundEffect = 'SoundEffect'; ReverbSoundEffect = 'SoundEffect'; TremoloSoundEffect = 'SoundEffect'; SoundGroup = 'Instance'; SoundService = 'Instance'; Sparkles = 'Instance'; SpawnerService = 'Instance'; StarterGear = 'Instance'; StarterPlayer = 'Instance'; StarterPlayerScripts = 'Instance'; StarterCharacterScripts = 'StarterPlayerScripts'; Stats = 'Instance'; StatsItem = 'Instance'; RunningAverageItemDouble = 'StatsItem'; RunningAverageItemInt = 'StatsItem'; RunningAverageTimeIntervalItem = 'StatsItem'; TotalCountTimeIntervalItem = 'StatsItem'; StringValue = 'Instance'; TaskScheduler = 'Instance'; Team = 'Instance'; Teams = 'Instance'; TeleportService = 'Instance'; TerrainRegion = 'Instance'; TestService = 'Instance'; TextService = 'Instance'; TextFilterResult = 'Instance'; ThirdPartyUserService = 'Instance'; TimerService = 'Instance'; Toolbar = 'Instance'; TouchInputService = 'Instance'; TouchTransmitter = 'Instance'; TweenService = 'Instance'; UIBase = 'Instance'; UIComponent = 'UIBase'; UIConstraint = 'UIComponent'; UIAspectRatioConstraint = 'UIConstraint'; UISizeConstraint = 'UIConstraint'; UITextSizeConstraint = 'UIConstraint'; UILayout = 'UIComponent'; UITableLayout = 'UIGridStyleLayout'; UIGridStyleLayout = 'UILayout'; UIGridLayout = 'UIGridStyleLayout'; UIListLayout = 'UIGridStyleLayout'; UIPageLayout = 'UIGridStyleLayout'; UIPadding = 'UIComponent'; UIScale = 'UIComponent'; UserGameSettings = 'Instance'; UserInputService = 'Instance'; VRService = 'Instance'; Vector3Value = 'Instance'; VirtualUser = 'Instance'; Visit = 'Instance'; -- Removed classes AnimationTrackState = 'Instance'; App = 'DataModel'; Authoring = 'Instance'; ClusterPacketCache = 'Instance'; ContentFilter = 'Instance'; DebuggerService = 'Instance'; FastLogSettings = 'Instance'; FWService = 'Instance'; LoadingGui = 'Instance'; LocalBackpack = 'GuiItem'; MoveToConstraint = 'Constraint'; NotificationBox = 'GuiObject'; NotificationObject = 'Frame'; PlayerHUD = 'GuiItem'; ProfilingItem = 'StatsItem'; PseudoPlayer = 'Instance'; ScriptInformationProvider = 'Instance'; SocialService = 'Instance'; SpatialQueryCache = 'Instance'; StarterScript = 'CoreScript'; StockSound = 'Sound'; StudioTool = 'Instance'; WeldConstraint = 'Instance'; UniverseService = 'Instance'; }

return p