Function

interface Function

Represents a function within Housing.

Provides accessors and mutators for all function settings, and its associated action container.

Implementations perform sequential behavior and therefore expose suspend functions for better interaction with Housing.

Properties

Link copied to clipboard
abstract var name: String

The name of this function. This technically does not need to be unique but having multiple functions with the same name will mess with the API's ability to act on a specific function, as the name is our only identifier.

Functions

Link copied to clipboard
abstract suspend fun delete()

Deletes this function.

Link copied to clipboard
abstract suspend fun getActionContainer(): ActionContainer

Returns the action container associated with this function.

Link copied to clipboard
abstract suspend fun getAutomaticExecution(): Int

Returns the automatic execution setting, in ticks.

Link copied to clipboard
abstract suspend fun getDescription(): String

Returns the current description of the function.

Link copied to clipboard
abstract suspend fun getIcon(): Item

Returns the icon item representing this function.

Link copied to clipboard
open suspend fun getName(): String

Returns the current name of the function.

Link copied to clipboard
abstract suspend fun setAutomaticExecution(newAutomaticExecution: Int): Function

Sets the automatic execution frequency, or disables it with 0.

Link copied to clipboard
abstract suspend fun setDescription(newDescription: String): Function

Sets the description for the function.

Link copied to clipboard
abstract suspend fun setIcon(newIcon: Item): Function

Sets the icon item for this function.

Link copied to clipboard
abstract suspend fun setName(newName: String): Function

Updates the function name.