Skip to content

Core Package (WIP)

Sky edited this page Dec 24, 2021 · 2 revisions

This package provides core system functionality essential to the functionality of server and client packages, including client-server communication and basic data handling, as well as the firing of certain system events which are used by other packages.

Server

The follow is documentation on methods and variables provided by the server portion of the Core package.

Events

Events that are currently provided by the Core package (Accessed via Utilities.Events.EventName):

  • PlayerAdded(Player, DelayedFire)

    Fired when a player joins the game. If players were present before the PlayerAdded event was connected to Players.PlayerAdded, PlayerAdded will be fired for those players with DelayedFire set to true. This makes it so existing players are not missed for important on-join initialization (such as client setup.)

  • PlayerReady(Player)

    Fired after the player's client has finished loading and is ready for system communication.

  • PlayerRemoving(Player)

    System event for Players.PlayerRemoving

  • PlayerRemoved(Player)

    Fired when a player is removed. PlayerRemoving fires as the player is being removed, this fires after they've been removed.

  • RemovingPlayerData(Player, Data)

    Fired right before player data is removed when a player is leaving.

  • CharacterAdded(Player, Character)

    Fired when a player's CharacterAdded event is triggered.

  • CharacterRemoving(Player, Character)

    Fired when a player's CharacterRemoving event is triggered.

  • NetworkAdded(NetworkClient)

    Fired when a new NetworkClient appears.

  • NetworkRemoved(NetworkClient)

    Fired when a NetworkClient disconnects.

  • LogAdded(Type, LogData)

    Fired whenever Core.Logging:AddLog(Type, LogData) is called.

  • LogMessage(Message, MessageType)

    Fired whenever a new (non-system) output log message appears.

  • AdonisLogMessage(Message, MessageType)

    Identical to the LogMessage event, however only fires if "Adonis" is found within the log message.

Process

Sets up various system events for use throughout the system.

Logging

Handles system logging.

Logging:AddLog(Type, LogData)

Creates and stores a new log of Type.

Logging:GetLogs(Type)

Returns a list of all logs of Type.

Core

Responsible for some basic core functionality and events, such as player data and settings handling.

Remote

Responsible for client creation, loading, and communication.

Bytecode

Responsible for bytecode generation and loading and loadstring functionality.

Client

The follow is documentation on methods and variables provided by the client portion of the Core package.

Process

Core

Remote

Bytecode