Skip to content

Modules

1Humza edited this page Oct 9, 2021 · 39 revisions

Modules that come with the Evolve Framework.

Custom Objects

This module creates Custom Objects defined by classes you create within the Classes folder under Modules.

Replication

This module supports property replication to clients. It follows the same rules as instance replication.
NOTE: Custom Objects are also designed to be fully compatible with Streaming Enabled.

Methods

new( instance Object, string Class, ... )

Returns instance, ... alongside any additional variables returned from class defined new.
Creates new Custom Object based on new constructor defined in the class specified by the second argument. Any more arguments will be passed to the user defined new constructor.

Wrap( instance Object, string Class )

Returns customobject
Wraps passed Object into Custom Object. Allows you to transform existing instances into Custom Objects to retain properties and explorer hierarchy.

Clone( customobject CustomObject )

Returns customobject

GetObject( customobject CustomObject )

Returns instance
Returns base instance that the Custom Object wrapper is applied to.

GetClassName( customobject CustomObject )

Returns string
Returns name of Class that the Custom Object was created from.

GetUUID( customobject CustomObject )

Returns number
Returns unique ID assigned to all Custom Objects.

AddSearchBank( customobject CustomObject )

Returns nil


Events

This module creates Custom Objects defined by Classes you create.

Methods

new( string ClassName )

Returns instance or Returns RBXScriptConnection
Creates new Event of type ClassName. Handles parenting and naming if it is an instance.
This module incorporates stravant's Good Signal module. It offers a very performant alternative to Bindable Events using the new Task Library. Passing "Signal" to this function will create a custom RBXScriptConnection and return it.


Maid

Maid class incorporated from Quenty's Nevermore. Read his documentation here.


Table

Methods

new ( string Type )

Returns table

Type Description
CountedDictionary # Operator works on the returned table. Allows to easily get length of non-array.



typeof ( variable Entity )

Returns string
This module returns a function. It is designed to expand on what is returned from the existing typeof function to allow identifying CustomObject and RBXScriptConnection.

Usage

--Some script

local require = require(game:GetService("ReplicatedStorage"):WaitForChild("Evolve"))

local typeof = require("typeof") --Overwrites existing `typeof` function with our extended version.



Clone this wiki locally