Skip to content

DS_TileInfo

Kamran Wali edited this page Jul 9, 2024 · 6 revisions

Inherits: Resource

Base class for holding information/data for fixed tiles.

Description

DS_TileInfo is the parent/base class for holding fixed tile information which is tiles that needs to have certain data set to them before the generator starts processing.

Properties

Type Name Default Value
int _id -1
DS_TileInfo[] _data
String[] _names
int _grid_size -1
String _type_names ""
String _grid_pos_names ""

Methods

Return Type Name
void set_data( DS_TileInfo[] data, String[] names, int grid_size, int id )
int get_rot_value()
bool is_fixed()
int get_type()
int get_index()
void update_property_list()
void _update_all_property_list()

Property Descriptions

int _id = -1

The unique id for the DS_TileInfo. This is mainly needed by the script ds_tile_start to point out that DS_TileInfo has been set.


An array that contains all the DS_TileInfo that has been set. This is mainly needed for internal logic to check if a tile has already been given fixed data.


String[] _names

An array that contains the name of all the tile type. This is needed for internal logic so that the user can select which tile type to give to the DS_TileInfo.


int _grid_size = -1

The size of the grid.


String _type_names = ""

A string that is used to show all the names of the tile types in an enum using the _get_property_list() method.


String _grid_pos_names = ""

A string that is used to show all the tile index that have been set in an enum using the _get_property_list() method.


Method Descriptions

void set_data ( DS_TileInfo[] data, String[] names, int grid_size, int id )

This method sets the data for the DS_TileInfo. These data needs to be set so that enums will work in DS_TileInfo.


int get_rot_value ()

This method gets the rotation value.


bool is_fixed ()

This method checks if the tile should be fixed or NOT.


int get_type ()

This method gets the type of the tile.


int get_index ()

This method gets the unique index of the tile.


void update_property_list ()

This method updates the _get_property_list() method.


void _update_all_property_list ()

This method updates the _get_property_list() method for all the DS_TileInfo in the property _data.