pub struct LuaSurfaceSpillItemStackParams {
pub allow_belts: bool,
pub drop_full_stack: bool,
pub enable_looted: bool,
pub force: ForceID,
pub max_radius: f64,
pub position: MapPosition,
pub stack: ItemStackIdentification,
pub use_start_position_on_failure: bool,
}Expand description
Spill items on the ground centered at a given location.
Fields§
§allow_belts: boolWhether items can be spilled onto belts. Defaults to true.
drop_full_stack: boolIf item on ground should be made out of an entire provided stack. Defaults to false.
enable_looted: boolWhen true, each created item will be flagged with the LuaEntity::to_be_looted flag. Defaults to false.
force: ForceIDWhen provided (and not nil) the items will be marked for deconstruction by this force.
max_radius: f64Max radius from the specified position to spill items.
position: MapPositionCenter of the spillage
stack: ItemStackIdentificationStack of items to spill
use_start_position_on_failure: boolAllow spilling items at position if no non-colliding position is found. Note: Setting to false might cause some items not to be spilled. Defaults to true.
Trait Implementations§
Source§impl Clone for LuaSurfaceSpillItemStackParams
impl Clone for LuaSurfaceSpillItemStackParams
Source§fn clone(&self) -> LuaSurfaceSpillItemStackParams
fn clone(&self) -> LuaSurfaceSpillItemStackParams
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Default for LuaSurfaceSpillItemStackParams
impl Default for LuaSurfaceSpillItemStackParams
Source§fn default() -> LuaSurfaceSpillItemStackParams
fn default() -> LuaSurfaceSpillItemStackParams
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for LuaSurfaceSpillItemStackParams
impl RefUnwindSafe for LuaSurfaceSpillItemStackParams
impl Send for LuaSurfaceSpillItemStackParams
impl Sync for LuaSurfaceSpillItemStackParams
impl Unpin for LuaSurfaceSpillItemStackParams
impl UnsafeUnpin for LuaSurfaceSpillItemStackParams
impl UnwindSafe for LuaSurfaceSpillItemStackParams
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