Libraries.Interface.Controls.Scenes.Blueprints.ItemBlueprint Documentation

The ItemBlueprint class represents a set of fields used to build a preview in the scene editor. Through Blueprints and previews the user can add new items into their scenes. This class only has several basic fields needed to make a preview such as a name and description. The classes that inherit from this class have more information about the specific item being added such as a drawable or a model from a file.

Inherits from: Libraries.Language.Object

Actions Documentation

Compare(Libraries.Language.Object object)

This action compares two object hash codes and returns an integer. The result is larger if this hash code is larger than the object passed as a parameter, smaller, or equal. In this case, -1 means smaller, 0 means equal, and 1 means larger. This action was changed in Quorum 7 to return an integer, instead of a CompareResult object, because the previous implementation was causing efficiency issues.

Parameters

Return

integer: The Compare result, Smaller, Equal, or Larger.

Example

Object o
Object t
integer result = o:Compare(t) //1 (larger), 0 (equal), or -1 (smaller)

Equals(Libraries.Language.Object object)

This action determines if two objects are equal based on their hash code values.

Parameters

Return

boolean: True if the hash codes are equal and false if they are not equal.

Example

use Libraries.Language.Object
use Libraries.Language.Types.Text
Object o
Text t
boolean result = o:Equals(t)

GetDescription()

This action returns the text description of the blueprint.

Return

text: The description of this blueprint

GetHashCode()

This action gets the hash code for an object.

Return

integer: The integer hash code of the object.

Example

Object o
integer hash = o:GetHashCode()

GetName()

This action returns the name of the blueprint.

Return

text: The name of this blueprint

GetPaletteCrop()

This action returns how much to crop the palette image so it can be fitted into an icon properly.

Return

number: A number representing how much to crop the icon

GetPaletteIcon()

This action would return the texture for an icon of this blueprint. The icon can be used in a palette so the user can see what item looks like before being added to the scene.

Return

Libraries.Game.Graphics.TextureRegion: The texture for an icon

GetPaletteScale()

This action returns the scale of the icon so the icon can be sized properly when in a palette.

Return

number: The scale to be used in a palette

GetResponsiveness()

This action returns the responsiveness field of this blueprint.

Return

integer: The responsiveness field

IsPhysicsEnabled()

This action returns the physics enabled field of this blueprint.

Return

boolean: The physics enabled field

SetDescription(text description)

This action sets the text description of the blueprint.

Parameters

  • text description: The new description of this blueprint

SetName(text name)

This action sets the name of the blueprint.

Parameters

  • text name: The new name of this blueprint

SetPaletteCrop(number paletteCrop)

This action sets how much to crop the palette image so it can be fitted into an icon properly.

Parameters

  • number paletteCrop: The amount to crop the palette icon

SetPaletteScale(number paletteScale)

This action sets the scale of the icon so the icon can be sized properly when in a palette.

Parameters

  • number paletteScale: The scale to be used in a palette

SetPhysicsEnabled(boolean enabled)

This action sets the physics enabled field of this blueprint.

Parameters

  • boolean enabled: If true this blueprint has physics enabled by default for this item

SetResponsiveness(integer responsive)

This action sets the responsiveness field of this blueprint.

Parameters

  • integer responsive: An integer for how this item will respond to other physics objects