Skip to content

TransRange

Type

TransRange

A single 'part' of a custom Translation, which can be made up of multiple (each one corresponding to a range in the palette).

Derived Types

The following types inherit all TransRange properties and functions:

Constants

Name Value
TYPE_PALETTE 0
TYPE_COLOUR 1
TYPE_DESAT 2
TYPE_BLEND 3
TYPE_TINT 4
TYPE_SPECIAL 5

Properties

Property Type Description
type integer The type of translation for this range (see TYPE_ constants)
rangeStart integer The first palette index of the range (0 - 255)
rangeEnd integer The last palette index of the range (0 - 255)

Constructors

No Constructors

This type can not be created directly in scripts.

See:

Functions

Overview

General

AsText() -> string

Derived Type Casts

AsPaletteRange() -> TransRangePalette AsColourRange() -> TransRangeColour AsDesatRange() -> TransRangeDesat AsBlendRange() -> TransRangeBlend AsTintRange() -> TransRangeTint AsSpecialRange() -> TransRangeSpecial


AsText

Gets the text definition for this translation range (in ZDoom format).

Returns

  • string: A text representation of the translation range

AsPaletteRange

Casts to a TransRangePalette, if it is one.

Returns

  • TransRangePalette: The range as a 'palette' type range, or nil if it is not that type

AsColourRange

Casts to a TransRangeColour, if it is one.

Returns

  • TransRangeColour: The range as a 'colour' type range, or nil if it is not that type

AsDesatRange

Casts to a TransRangeDesat, if it is one.

Returns

  • TransRangeDesat: The range as a 'desat' type range, or nil if it is not that type

AsBlendRange

Casts to a TransRangeBlend, if it is one.

Returns

  • TransRangeBlend: The range as a 'blend' type range, or nil if it is not that type

AsTintRange

Casts to a TransRangeTint, if it is one.

Returns

  • TransRangeTint: The range as a 'tint' type range, or nil if it is not that type

AsSpecialRange

Casts to a TransRangeSpecial, if it is one.

Returns

  • TransRangeSpecial: The range as a 'special' type range, or nil if it is not that type