pub struct LuaSurfaceSpillInventoryParams {
pub allow_belts: bool,
pub drop_full_stack: bool,
pub enable_looted: bool,
pub force: LuaAny,
pub inventory: LuaInventory,
pub max_radius: f64,
pub position: MapPosition,
pub use_start_position_on_failure: bool,
}Expand description
Spill inventory 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: LuaAnyWhen provided (and not nil) the items will be marked for deconstruction by this force.
inventory: LuaInventoryInventory to spill
max_radius: f64Max radius from the specified position to spill items.
position: MapPositionCenter of the spillage
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 LuaSurfaceSpillInventoryParams
impl Clone for LuaSurfaceSpillInventoryParams
Source§fn clone(&self) -> LuaSurfaceSpillInventoryParams
fn clone(&self) -> LuaSurfaceSpillInventoryParams
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 LuaSurfaceSpillInventoryParams
impl Default for LuaSurfaceSpillInventoryParams
Source§fn default() -> LuaSurfaceSpillInventoryParams
fn default() -> LuaSurfaceSpillInventoryParams
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for LuaSurfaceSpillInventoryParams
impl RefUnwindSafe for LuaSurfaceSpillInventoryParams
impl Send for LuaSurfaceSpillInventoryParams
impl Sync for LuaSurfaceSpillInventoryParams
impl Unpin for LuaSurfaceSpillInventoryParams
impl UnsafeUnpin for LuaSurfaceSpillInventoryParams
impl UnwindSafe for LuaSurfaceSpillInventoryParams
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