pub struct Item {
pub name: &'static str,
pub icon: &'static str,
pub stack_size: i64,
pub icon_size: Option<i64>,
pub subgroup: Option<&'static str>,
pub order: Option<&'static str>,
}Expand description
Minimal ItemPrototype
for data.extend.
Required Factorio fields: name, icon (or icons), stack_size.
type = "item" is injected by the Lua generator.
Optional fields omit as Lua nil when None. Prefer
..Default::default() for fields you do not set (same sparse-table pattern
as other API structs).
Fields§
§name: &'static strInternal prototype name (e.g. "my-mod-widget").
icon: &'static strPackaged icon path (e.g. "__my_mod__/graphics/icon.png").
stack_size: i64Max items per inventory slot.
icon_size: Option<i64>Icon pixel size. Factorio defaults to 64 when omitted.
subgroup: Option<&'static str>Item subgroup id (e.g. "intermediate-product").
order: Option<&'static str>Sort order within the subgroup.
Trait Implementations§
impl Copy for Item
impl Eq for Item
impl StructuralPartialEq for Item
Auto Trait Implementations§
impl Freeze for Item
impl RefUnwindSafe for Item
impl Send for Item
impl Sync for Item
impl Unpin for Item
impl UnsafeUnpin for Item
impl UnwindSafe for Item
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more