319 {
321
323 m_Atts.InitAttachmentGrid( SORT_ATTACHMENTS_OWN );
325
328
329 m_ClosableHeader.SetItemPreview(
m_Entity );
330 CheckHeaderDragability();
331
333 {
335 m_CargoGrid.GetRootWidget().SetSort( SORT_CARGO_OWN );
339 }
340 else
341 {
344 m_ClosableHeader.SetName(
name );
345 }
346
350
352
354 {
356 if ( item )
358 }
359
361
363 {
366 {
368 }
370 {
372 }
373 }
374
376 SetOpenState( true );
377 else
378 SetOpenState( false );
379
380 if (immedUpdate)
382
383 RecomputeOpenedContainers();
384 }
PlayerSpawnPresetDiscreteItemSetSlotData name
one set for cargo
ref map< EntityAI, ref CargoContainer > m_AttachmentCargos
void AttachmentAddedEx(EntityAI item, string slot, EntityAI parent, bool immedUpdate=true)
void AttachmentRemoved(EntityAI item, string slot, EntityAI parent)
void RecomputeContainers()
ref map< EntityAI, ref Attachments > m_AttachmentAttachments
ref map< EntityAI, ref AttachmentsWrapper > m_AttachmentAttachmentsContainers
void AttachmentAdded(EntityAI item, string slot, EntityAI parent)
ref CargoContainer m_CargoGrid
ref array< int > m_AttachmentSlotsSorted
override bool IsDisplayable()
proto native GameInventory GetInventory()
ScriptInvoker GetOnItemAttached()
ScriptInvoker GetOnItemDetached()
proto native CargoBase GetCargo()
cargo
proto native bool IsInventoryLockedForLockType(int lockType)
proto native EntityAI FindAttachment(int slot)
Returns attached entity in slot (you can use InventorySlots.GetSlotIdFromString(name) to get slot id)
proto bool Insert(func fn, int flags=EScriptInvokerInsertFlags.IMMEDIATE)
insert method to list