pub struct LuaPlayerStackTransfersParams {
pub check_for_invalid_armor_removal: bool,
pub index: u32,
pub notify_if_invalid_armor_removal: bool,
pub play_transfer_sound: bool,
pub source_inventory: LuaInventory,
pub target: LuaAny,
pub target_equipment_grid: bool,
pub transfer_type: String,
}Expand description
Performs the given transfer action between the source and target as if the player did the action.
This can be paired with defines.events.on_gui_inventory_action to make custom inventory GUIs that act like builtin inventories.
Reach distance is ignored and can be checked using LuaControl::can_reach_entity if wanted.
Fields§
§check_for_invalid_armor_removal: boolIf transfer from the player armor inventory is blocked when flying or if it would shrink the inventory to the point items would spill. Defaults to true.
index: u32The inventory slot index.
notify_if_invalid_armor_removal: boolIf on being blocked by invalid armor removal it sends a notification to the player that the transfer is blocked. Defaults to true.
play_transfer_sound: boolIf the standard sound for transferring items should be played on success. Defaults to true.
source_inventory: LuaInventoryThe inventory to transfer from.
target: LuaAny§target_equipment_grid: boolIf true - when transferring into vehicles - only placeable equipment items will be placed into the equipment grid as equipment and normal items are skipped. Defaults to false.
transfer_type: StringThe type of transfer to perform. Only stack_transfer, stack_split, inventory_transfer, and inventory_split can be used.
Trait Implementations§
Source§impl Clone for LuaPlayerStackTransfersParams
impl Clone for LuaPlayerStackTransfersParams
Source§fn clone(&self) -> LuaPlayerStackTransfersParams
fn clone(&self) -> LuaPlayerStackTransfersParams
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more