Texture functions
define_texture
function define_texture(texture_data: TextureDefinition): TEXTUREtexture_data:TextureDefinition
Returns TEXTURE
Defines a new texture that can be used in Entity::set_texture If a texture with the same definition already exists the texture will be reloaded from disk.
get_texture
function get_texture(texture_data: TextureDefinition): TEXTURE?texture_data:TextureDefinition
Returns TEXTURE? (may be nil)
Gets a texture with the same definition as the given, if none exists returns nil
get_texture_definition
function get_texture_definition(texture_id: TEXTURE): TextureDefinitiontexture_id:TEXTURE
Returns TextureDefinition
Gets a TextureDefinition for equivalent to the one used to define the texture with id
reload_texture
function reload_texture(texture_path: string)texture_path:string
Reloads a texture from disk, use this only as a development tool for example in the console Note that define_texture will also reload the texture if it already exists
replace_texture
function replace_texture(vanilla_id: TEXTURE, custom_id: TEXTURE): booleanReturns boolean
Replace a vanilla texture definition with a custom texture definition and reload the texture.
replace_texture_and_heart_color
function replace_texture_and_heart_color(vanilla_id: TEXTURE, custom_id: TEXTURE): booleanReturns boolean
Replace a vanilla texture definition with a custom texture definition and reload the texture. Set corresponding character heart color to the pixel in the center of the player indicator arrow in that texture. (448,1472)
reset_lut
function reset_lut(layer: LAYER)layer:LAYER
Same as set_lut(nil, layer)
reset_texture
function reset_texture(vanilla_id: TEXTURE)vanilla_id:TEXTURE
Reset a replaced vanilla texture to the original and reload the texture.
set_lut
function set_lut(texture_id: TEXTURE?, layer: LAYER)Force the LUT texture for the given layer (or both) until it is reset.
Pass nil in the first parameter to reset