pub struct MessageLogic { /* private fields */ }

Implementations§

source§

impl MessageLogic

source

pub const fn new( size: u8, symmetric: bool, build_cost: &'static [(Type, u32)] ) -> Self

source

pub fn get_state(state: &State) -> &Stringwhere Self: Sized,

source

pub fn get_state_mut(state: &mut State) -> &mut Stringwhere Self: Sized,

Trait Implementations§

source§

impl BlockLogic for MessageLogic

source§

fn get_size(&self) -> u8

mindustry blocks are the same width and height
source§

fn is_symmetric(&self) -> bool

source§

fn create_build_cost(&self) -> Option<ItemStorage>

source§

fn data_from_i32(&self, _: i32, _: GridPos) -> Result<DynData, DataConvertError>

source§

fn draw( &self, _: &str, _: Option<&State>, _: Option<&RenderingContext<'_>>, _: Rotation, _: Scale ) -> ImageHolder

source§

fn deserialize_state( &self, data: DynData ) -> Result<Option<State>, DeserializeError>

source§

fn clone_state(&self, state: &State) -> State

source§

fn mirror_state(&self, _: &mut State, _: bool, _: bool)

source§

fn rotate_state(&self, _: &mut State, _: bool)

source§

fn serialize_state(&self, state: &State) -> Result<DynData, SerializeError>

source§

fn read( &self, b: &mut Build<'_>, _: &BlockRegistry<'_>, _: &EntityMapping, buff: &mut DataRead<'_> ) -> Result<(), DataReadError>

source§

fn want_context(&self) -> bool

Auto Trait Implementations§

Blanket Implementations§

source§

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

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

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

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

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

source§

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

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere 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, U> TryFrom<U> for Twhere U: Into<T>,

§

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 Twhere U: TryFrom<T>,

§

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.