Module CustomObject
Module that contains functions for creating custom objects and filtering their associated properties.
Info:
- License: MIT
- Author: Richard Voelker
Functions
IsACustomObject (name) | |
CreateObject (name, romlDoc, objectId, classes) | Creates a CustomObject. |
FilterProperty (objectName, propertyName, value, LiteralString, CompilerPropertyFilter) | Filter a property based on the CustomObject's rules. |
Functions
- IsACustomObject (name)
-
Parameters:
- name string The name of the CustomObject.
Returns:
-
bool
Whether or not the object name is a
CustomObject.
- CreateObject (name, romlDoc, objectId, classes)
-
Creates a CustomObject.
Parameters:
- name string The name of the CustomObject.
- romlDoc RomlDoc The RomlDoc object that this CustomObject will be a part of.
- objectId string The ID of the object, or nil if there is none.
- classes array An array of strings for the classes, or nil if there are none.
Returns:
-
CustomObject
The created CustomObject.
- FilterProperty (objectName, propertyName, value, LiteralString, CompilerPropertyFilter)
-
Filter a property based on the CustomObject's rules.
Parameters:
- objectName string The name of the CustomObject.
- propertyName string The name of the property to filter.
- value string The input string.
- LiteralString table The LiteralString class.
- CompilerPropertyFilter table The CompilerPropertyFilter class.
Returns:
-
LiteralString
The filtered property value.