pub struct AutoLayerRuleDefinition {
Show 22 fields pub active: bool, pub break_on_match: bool, pub chance: f64, pub checker: Checker, pub flip_x: bool, pub flip_y: bool, pub out_of_bounds_value: Option<i64>, pub pattern: Vec<i64>, pub perlin_active: bool, pub perlin_octaves: f64, pub perlin_scale: f64, pub perlin_seed: f64, pub pivot_x: f64, pub pivot_y: f64, pub size: i64, pub tile_ids: Vec<i64>, pub tile_mode: TileMode, pub uid: i64, pub x_modulo: i64, pub x_offset: i64, pub y_modulo: i64, pub y_offset: i64,
}
Expand description

This complex section isn’t meant to be used by game devs at all, as these rules are completely resolved internally by the editor before any saving. You should just ignore this part.

Fields

active: bool

If FALSE, the rule effect isn’t applied, and no tiles are generated.

break_on_match: bool

When TRUE, the rule will prevent other rules to be applied in the same cell if it matches (TRUE by default).

chance: f64

Chances for this rule to be applied (0 to 1)

checker: Checker

Checker mode Possible values: None, Horizontal, Vertical

flip_x: bool

If TRUE, allow rule to be matched by flipping its pattern horizontally

flip_y: bool

If TRUE, allow rule to be matched by flipping its pattern vertically

out_of_bounds_value: Option<i64>

Default IntGrid value when checking cells outside of level bounds

pattern: Vec<i64>

Rule pattern (size x size)

perlin_active: bool

If TRUE, enable Perlin filtering to only apply rule on specific random area

perlin_octaves: f64perlin_scale: f64perlin_seed: f64pivot_x: f64

X pivot of a tile stamp (0-1)

pivot_y: f64

Y pivot of a tile stamp (0-1)

size: i64

Pattern width & height. Should only be 1,3,5 or 7.

tile_ids: Vec<i64>

Array of all the tile IDs. They are used randomly or as stamps, based on tileMode value.

tile_mode: TileMode

Defines how tileIds array is used Possible values: Single, Stamp

uid: i64

Unique Int identifier

x_modulo: i64

X cell coord modulo

x_offset: i64

X cell start offset

y_modulo: i64

Y cell coord modulo

y_offset: i64

Y cell start offset

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Deserialize this value from the given Serde deserializer. Read more

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.