Struct AutoLayerRuleDefinition

Source
pub struct AutoLayerRuleDefinition {
Show 29 fields pub active: bool, pub alpha: f64, 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 tile_random_x_max: i64, pub tile_random_x_min: i64, pub tile_random_y_max: i64, pub tile_random_y_min: i64, pub tile_x_offset: i64, pub tile_y_offset: i64, 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.

§alpha: f64§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: f64§perlin_scale: f64§perlin_seed: f64§pivot_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

§tile_random_x_max: i64

Max random offset for X tile pos

§tile_random_x_min: i64

Min random offset for X tile pos

§tile_random_y_max: i64

Max random offset for Y tile pos

§tile_random_y_min: i64

Min random offset for Y tile pos

§tile_x_offset: i64

Tile X offset

§tile_y_offset: i64

Tile Y offset

§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§

Source§

impl Clone for AutoLayerRuleDefinition

Source§

fn clone(&self) -> AutoLayerRuleDefinition

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for AutoLayerRuleDefinition

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for AutoLayerRuleDefinition

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Serialize for AutoLayerRuleDefinition

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<S> FromSample<S> for S

Source§

fn from_sample_(s: S) -> S

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

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

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

impl<F, T> IntoSample<T> for F
where T: FromSample<F>,

Source§

fn into_sample(self) -> T

Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

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

fn clone_into(&self, target: &mut T)

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

impl<T, U> ToSample<U> for T
where U: FromSample<T>,

Source§

fn to_sample_(self) -> U

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

impl<T> Any for T
where T: Any,

Source§

impl<T> CloneAny for T
where T: Any + Clone,

Source§

impl<T> Component for T
where T: Send + Sync + 'static,

Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<S, T> Duplex<S> for T
where T: FromSample<S> + ToSample<S>,

Source§

impl<T> SerializableAny for T
where T: 'static + Any + Clone + for<'a> Send + Sync,