Dayz 1.25
Dayz Code Explorer by KGB
Загрузка...
Поиск...
Не найдено
Класс HandsContainer
+ Граф наследования:HandsContainer:

Защищенные члены

void HandsContainer (LayoutHolder parent)
 
void ~HandsContainer ()
 
void ResetContainer ()
 
override Header GetHeader ()
 
override bool IsLastIndex ()
 
void SetFocusToIndex ()
 
void ScrollToActiveContainer (Container active_container)
 
override void Insert (LayoutHolder container, int pos=-1, bool immedUpdate=true)
 
override bool TransferItem ()
 
override bool SplitItem ()
 
override bool EquipItem ()
 
override void SetActive (bool active)
 
override void SetLastActive ()
 
override void Refresh ()
 
override bool IsItemActive ()
 
override bool IsItemWithQuantityActive ()
 
override bool IsEmpty ()
 
override bool TransferItemToVicinity ()
 
override bool InspectItem ()
 
override bool OnSelectButton ()
 
EntityAI GetItemPreviewItem (Widget w)
 
override void DraggingOverHeader (Widget w, int x, int y, Widget receiver)
 
void OnDropReceivedFromHeader2 (Widget w, int x, int y, Widget receiver)
 
void OnPerformCombination (int combinationFlags)
 
void ShowActionMenuCombine (EntityAI entity1, EntityAI entity2, int combinationFlags)
 
override void OnDropReceivedFromHeader (Widget w, int x, int y, Widget receiver)
 
int GetCombinationFlags (EntityAI entity1, EntityAI entity2)
 
int GetRecipeCount (bool recipe_anywhere, EntityAI entity1, EntityAI entity2)
 
void RemoveItem ()
 
void DestroyAtt ()
 
override void UnfocusGrid ()
 
override void UnfocusAll ()
 
void DestroyCargo ()
 
void DropReceived (Widget w, int x, int y, CargoContainer cargo)
 
bool DraggingOverGrid (Widget w, int x, int y, Widget reciever, CargoContainer cargo)
 
void TakeAsAttachment (Widget w, Widget receiver)
 
void ShowAtt (EntityAI entity)
 
void RefreshHands ()
 
void AttachmentAdded (EntityAI item, string slot, EntityAI parent)
 
void AttachmentRemoved (EntityAI item, string slot, EntityAI parent)
 
override void UpdateInterval ()
 
override void SetLayoutName ()
 
override void OnShow ()
 
void MouseClick2 (Widget w, int x, int y, int button)
 
void DoubleClick (Widget w, int x, int y, int button)
 
void DraggingOverHeader2 (Widget w, int x, int y, Widget receiver)
 
void ElectricityIcon ()
 
void CollapseButtonOnMouseButtonDown (Widget w)
 
void HideCargo ()
 
void ShowCargo ()
 

Защищенные данные

bool m_Hidden
 
ref HandsHeader m_CollapsibleHeader
 
ref HandsPreview m_HandsPreview
 
ref Attachments m_Atts
 
ref CargoContainer m_CargoGrid
 
ref map< EntityAI, ref CargoContainerm_AttachmentCargos
 
ref map< EntityAI, AttachmentsWrapperm_AttachmentAttachmentsContainers
 
ref map< EntityAI, ref Attachmentsm_AttachmentAttachments
 
ref array< intm_AttachmentSlotsSorted
 
int m_StaticAttCount = 0
 
int m_StaticCargoCount = 0
 
ScrollWidget m_ScrollWidget
 

Дополнительные унаследованные члены

- Закрытые члены унаследованные от Container
void CargoContainer (LayoutHolder parent, bool is_attachment=false)
 
void ~CargoContainer ()
 
int GetCargoIndex ()
 
void AddedToCargoEx (EntityAI item, bool refresh=true)
 
void AddedToCargo (EntityAI item)
 
void RemovedFromCargo (EntityAI item)
 
void MovedInCargo (EntityAI item)
 
void SetLock (EntityAI item)
 
void ReleaseLock (EntityAI item)
 
override void SetLayoutName ()
 
void SetEntity (EntityAI item, int cargo_index=0, bool immedUpdate=true)
 
EntityAI GetEntity ()
 
void UpdateHeaderText ()
 
void InitGridHeight ()
 
void UpdateSize ()
 
float GetIconSize ()
 
float GetSpaceSize ()
 
int GetCargoCapacity ()
 
int GetMaxCargoCapacity ()
 
Icon GetIcon (EntityAI item)
 
Icon GetIcon (int index)
 
Icon GetFocusedIcon ()
 
override float GetFocusedContainerHeight (bool contents=false)
 
override float GetFocusedContainerYPos (bool contents=false)
 
override float GetFocusedContainerYScreenPos (bool contents=false)
 
void UpdateSelection ()
 
void UpdateRowVisibility (int count)
 
override void Refresh ()
 
void RefreshImpl ()
 
override void UpdateInterval ()
 
Icon InitIconEx (Icon icon, EntityAI item, int pos_x, int pos_y, bool refresh=true)
 
Icon InitIcon (Icon icon, EntityAI item, int pos_x, int pos_y)
 
bool HasItem (EntityAI item)
 
override bool TransferItemToVicinity ()
 
override void SetDefaultFocus (bool while_micromanagment_mode=false)
 
override void SetLastFocus ()
 
override void Unfocus ()
 
override void UnfocusAll ()
 
override void SetNextActive ()
 
override void SetPreviousActive (bool force=false)
 
override void SetNextRightActive ()
 
override void SetNextLeftActive ()
 
override EntityAI GetFocusedItem ()
 
override void SetLastActive ()
 
override void SetActive (bool active)
 
override bool IsItemActive ()
 
override bool IsItemWithQuantityActive ()
 
override bool IsEmpty ()
 
int GetRecipeCount (bool recipe_anywhere, ItemBase entity1, ItemBase entity2, PlayerBase player)
 
override bool CanCombineAmmo ()
 
override bool TransferItem ()
 
override bool SplitItem ()
 
override bool EquipItem ()
 
override bool SelectItem ()
 
override bool Select ()
 
override bool Combine ()
 
void ShowFalseCargoHeader (bool show)
 
void SetAlternateFalseTextHeaderWidget (TextWidget w)
 
void ClosableContainer (LayoutHolder parent, int sort=-1)
 
override bool IsDisplayable ()
 
override void UpdateRadialIcon ()
 
void SetOpenState (bool state)
 
override Header GetHeader ()
 
override void Open ()
 
override void Close ()
 
override void SetLayoutName ()
 
override void OnShow ()
 
override LayoutHolder Get (int x)
 
override void Refresh ()
 
void CloseButtonOnMouseButtonDown ()
 
override float GetFocusedContainerHeight (bool contents=false)
 
override float GetFocusedContainerYPos (bool contents=false)
 
override float GetFocusedContainerYScreenPos (bool contents=false)
 
void MoveContainerUp (Widget cont)
 
void MoveContainerDown (Widget cont)
 
override void CheckHeaderDragability ()
 
- Закрытые данные унаследованные от Container
const int ROWS_NUMBER_XBOX = 5
 
CargoBase m_Cargo
 
int m_CargoIndex = -1
 
int m_FocusedItemPosition = -1
 
ref array< ref CargoContainerRowm_Rows
 
ref array< ref Iconm_Icons
 
ref map< EntityAI, ref Param3< ref Icon, int, int > > m_ShowedItemPositions
 
ref map< EntityAI, ref Param3< ref Icon, int, int > > m_ShowedLockPositions
 
float m_IconSize
 
float m_SpaceSize
 
bool m_IsAttachment
 
TextWidget m_FalseHeaderTextWidget
 
TextWidget m_AlternateFalseHeaderTextWidget
 
Widget m_CargoHeader
 
Widget m_CargoContainer
 
Widget m_ItemsContainer
 
ref SizeToChild m_Resizer1
 
ref SizeToChild m_Resizer2
 
ref Timer m_ResizeTimer
 
ref ClosableHeader m_ClosableHeader
 
bool m_LockCargo
 

Подробное описание

Конструктор(ы)

◆ HandsContainer()

void HandsContainer ( LayoutHolder parent)
inlineprotected
21 {
25
26 m_CollapsibleHeader = new HandsHeader( this, "CollapseButtonOnMouseButtonDown" );
27 GetMainWidget().SetFlags( WidgetFlags.IGNOREPOINTER );
28 m_MainWidget = m_MainWidget.FindWidget( "body" );
29 GetMainWidget().SetFlags( WidgetFlags.IGNOREPOINTER );
30 m_Body = new array<ref LayoutHolder>;
31 m_HandsPreview = new HandsPreview( this );
32 ItemManager.GetInstance().SetHandsPreview( m_HandsPreview );
33 m_Body.Insert( m_HandsPreview );
34
35 ItemBase hands_item = ItemBase.Cast( GetGame().GetPlayer().GetHumanInventory().GetEntityInHands() );
36 if ( hands_item )
37 m_HandsPreview.CreateNewIcon( hands_item );
38
39 m_ScrollWidget = ScrollWidget.Cast( m_RootWidget.GetParent().GetParent() );
40 RecomputeOpenedContainers();
41 }
PlayerBase GetPlayer()
Definition ModifierBase.c:47
ref Widget m_RootWidget[MAX_SIMULTANIOUS_PLAYERS]
Definition PluginRemotePlayerDebugClient.c:14
ref HandsPreview m_HandsPreview
Definition HandsContainer.c:5
ref map< EntityAI, AttachmentsWrapper > m_AttachmentAttachmentsContainers
Definition HandsContainer.c:11
ref map< EntityAI, ref Attachments > m_AttachmentAttachments
Definition HandsContainer.c:12
ScrollWidget m_ScrollWidget
Definition HandsContainer.c:18
ref map< EntityAI, ref CargoContainer > m_AttachmentCargos
Definition HandsContainer.c:10
ref HandsHeader m_CollapsibleHeader
Definition HandsContainer.c:4
Definition HandsHeader.c:2
Definition HandsPreview.c:2
Definition InventoryItem.c:731
Definition ItemManager.c:2
static ItemManager GetInstance()
Definition ItemManager.c:283
Definition EntityAI.c:95
proto native CGame GetGame()
WidgetFlags
Definition EnWidgets.c:58

Перекрестные ссылки GetGame(), ItemManager::GetInstance(), GetPlayer(), m_AttachmentAttachments, m_AttachmentAttachmentsContainers, m_AttachmentCargos, m_CollapsibleHeader, m_HandsPreview, m_RootWidget и m_ScrollWidget.

◆ ~HandsContainer()

void ~HandsContainer ( )
inlineprotected
44 {
45 if ( m_Entity )
46 {
47 m_Entity.GetOnItemAttached().Remove( AttachmentAdded );
48 m_Entity.GetOnItemDetached().Remove( AttachmentRemoved );
49 }
50
51 m_AttachmentCargos.Clear();
54 }
EntityAI m_Entity
Definition ActionDebug.c:11
void AttachmentAdded(EntityAI item, string slot, EntityAI parent)
Definition HandsContainer.c:1282
void AttachmentRemoved(EntityAI item, string slot, EntityAI parent)
Definition HandsContainer.c:1337

Перекрестные ссылки AttachmentAdded(), AttachmentRemoved(), m_AttachmentAttachments, m_AttachmentAttachmentsContainers, m_AttachmentCargos и m_Entity.

Методы

◆ AttachmentAdded()

void AttachmentAdded ( EntityAI item,
string slot,
EntityAI parent )
inlineprotected
1283 {
1285 int sort = -1;
1288
1289 if( item.GetInventory().GetAttachmentSlotsCount() > 0 )
1290 {
1291 att_cont = new Attachments( this, item );
1292 sort = (m_AttachmentSlotsSorted.Find( slot_id ) * 2) + SORT_ATTACHMENTS_NEXT_OFFSET;
1293 att_cont.InitAttachmentGrid( sort );
1294
1296 m_AttachmentAttachmentsContainers.Insert( item, att_cont.GetWrapper() );
1297
1298 att_cont.UpdateInterval();
1299 if( m_Parent )
1300 m_Parent.Refresh();
1301 Inventory.GetInstance().UpdateConsoleToolbar();
1302 }
1303
1304 if( item.GetInventory().GetCargo() )
1305 {
1306 cont = new CargoContainer( this, true );
1307 sort = (m_AttachmentSlotsSorted.Find( slot_id ) * 2) + SORT_CARGO_NEXT_OFFSET; //m_AttachmentSlotsSorted.Find( slot_id ) + 50
1308 cont.GetRootWidget().SetSort( sort );
1309 cont.SetEntity( item );
1310
1311 Insert(cont, -1);
1312
1313 m_AttachmentCargos.Insert( item, cont );
1314 if( m_Parent )
1315 m_Parent.Refresh();
1316 Inventory.GetInstance().UpdateConsoleToolbar();
1317 }
1318
1319 if (att_cont)
1320 {
1321 att_cont.ShowFalseAttachmentsHeader(true);
1322 if (cont)
1323 {
1324 cont.ShowFalseCargoHeader(false);
1325 cont.UpdateSize();
1326 cont.SetAlternateFalseTextHeaderWidget(att_cont.GetFalseHeaderTextWidget());
1327 }
1328 }
1329 else if (cont)
1330 {
1331 cont.SetAlternateFalseTextHeaderWidget(null); //just to be safe..
1332 }
1333
1334 RecomputeOpenedContainers();
1335 }
void Inventory(LayoutHolder parent)
Definition Inventory.c:76
Widget m_Parent
Definition SizeToChild.c:92
Definition Attachments.c:4
void CargoContainer(LayoutHolder parent, bool is_attachment=false)
Definition CargoContainer.c:30
ref array< int > m_AttachmentSlotsSorted
Definition HandsContainer.c:13
override void Insert(LayoutHolder container, int pos=-1, bool immedUpdate=true)
Definition HandsContainer.c:182
provides access to slot configuration
Definition InventorySlots.c:6
static proto native int GetSlotIdFromString(string slot_name)
converts string to slot_id

Перекрестные ссылки Container::CargoContainer(), InventorySlots::GetSlotIdFromString(), Insert(), Inventory(), m_AttachmentAttachments, m_AttachmentAttachmentsContainers, m_AttachmentCargos, m_AttachmentSlotsSorted и m_Parent.

Используется в DestroyAtt(), ShowAtt() и ~HandsContainer().

◆ AttachmentRemoved()

void AttachmentRemoved ( EntityAI item,
string slot,
EntityAI parent )
inlineprotected
1338 {
1340
1342 if( old_cont )
1343 {
1344 m_Body.RemoveItem( old_cont );
1345 m_AttachmentCargos.Remove( item );
1346 delete old_cont;
1347 if( m_Parent )
1348 m_Parent.Refresh();
1349 Inventory.GetInstance().UpdateConsoleToolbar();
1350 }
1351
1353 if( old_att_cont )
1354 {
1356 m_AttachmentAttachments.Remove( item );
1357 m_Body.RemoveItem( old_att_cont );
1358 delete old_att_cont;
1359 if( m_Parent )
1360 m_Parent.Refresh();
1361 Inventory.GetInstance().UpdateConsoleToolbar();
1362 }
1363 RecomputeOpenedContainers();
1364 }
Definition AttachmentsWrapper.c:2

Перекрестные ссылки Container::CargoContainer(), InventorySlots::GetSlotIdFromString(), Inventory(), m_AttachmentAttachments, m_AttachmentAttachmentsContainers, m_AttachmentCargos и m_Parent.

Используется в DestroyAtt(), ShowAtt() и ~HandsContainer().

◆ CollapseButtonOnMouseButtonDown()

void CollapseButtonOnMouseButtonDown ( Widget w)
inlineprotected
1546 {
1547 int i;
1548 if( !m_Hidden )
1549 {
1550 for (i = 0; i < m_Body.Count(); i++)
1551 {
1552 m_Body.Get( i ).OnHide();
1553 }
1554 m_Hidden = true;
1555 }
1556 else
1557 {
1558 for (i = 0; i < m_Body.Count(); i++)
1559 {
1560 m_Body.Get( i ).OnShow();
1561 }
1562 m_Hidden = false;
1563 }
1564
1565 w.FindAnyWidget("opened").Show(m_Hidden);
1566 w.FindAnyWidget("closed").Show(!m_Hidden);
1567
1568 m_Parent.Refresh();
1569 }
bool m_Hidden
Definition HandsContainer.c:3

Перекрестные ссылки m_Hidden и m_Parent.

◆ DestroyAtt()

void DestroyAtt ( )
inlineprotected
884 {
885 if( m_Atts )
886 {
887 m_Body.RemoveItem( m_Atts.GetWrapper() );
888 delete m_Atts;
889
890 if( m_Entity )
891 {
892 m_Entity.GetOnItemAttached().Remove( AttachmentAdded );
893 m_Entity.GetOnItemDetached().Remove( AttachmentRemoved );
894 }
895 }
896
898 {
900 {
901 m_Body.RemoveItem( att );
903 delete att;
904 }
905 }
906
908 Refresh();
909 m_Parent.Refresh();
910 RecomputeOpenedContainers();
911 }
Definition Building.c:6
override void Refresh()
Definition HandsContainer.c:318
ref Attachments m_Atts
Definition HandsContainer.c:7

Перекрестные ссылки AttachmentAdded(), AttachmentRemoved(), m_AttachmentAttachments, m_AttachmentAttachmentsContainers, m_Atts, m_Entity, m_Parent и Refresh().

◆ DestroyCargo()

void DestroyCargo ( )
inlineprotected
949 {
950 if( m_CargoGrid )
951 {
952 m_Body.RemoveItem( m_CargoGrid );
953 delete m_CargoGrid;
954 }
955
957 {
959 {
960 m_Body.RemoveItem( cargo );
961 delete cargo;
962 }
963 }
964
965 m_AttachmentCargos.Clear();
966 Refresh();
967 m_Parent.Refresh();
968 RecomputeOpenedContainers();
969 }
ref CargoContainer m_CargoGrid
Definition HandsContainer.c:8

Перекрестные ссылки Container::CargoContainer(), m_AttachmentCargos, m_CargoGrid, m_Parent и Refresh().

◆ DoubleClick()

void DoubleClick ( Widget w,
int x,
int y,
int button )
inlineprotected
1468 {
1469 if (button == MouseState.LEFT && !g_Game.IsLeftCtrlDown())
1470 {
1471 ItemPreviewWidget iw = ItemPreviewWidget.Cast(w.FindAnyWidget("Render"));
1472 if (!iw)
1473 {
1474 string name = w.GetName();
1475 name.Replace("PanelWidget", "Render");
1476 iw = ItemPreviewWidget.Cast(w.FindAnyWidget(name));
1477 }
1478
1479 if (!iw)
1480 iw = ItemPreviewWidget.Cast(w);
1481
1482 ItemBase item = ItemBase.Cast(iw.GetItem());
1483 if (item)
1484 {
1486 EntityAI itemInHands = controlledPlayer.GetHumanInventory().GetEntityInHands();
1487
1488 if (!item.GetInventory().CanRemoveEntity())
1489 return;
1490
1491 if (controlledPlayer.GetInventory().HasEntityInInventory(item) && controlledPlayer.GetHumanInventory().CanAddEntityInHands(item))
1492 {
1493 controlledPlayer.PredictiveTakeEntityToHands(item);
1494 }
1495 else
1496 {
1497 if (controlledPlayer.GetInventory().CanAddEntityToInventory(item) && controlledPlayer.GetHumanInventory().CanRemoveEntityInHands())
1498 {
1499 controlledPlayer.PredictiveTakeEntityToInventory(FindInventoryLocationType.ANY, item);
1500 }
1501 else
1502 {
1503 if (controlledPlayer.GetHumanInventory().CanAddEntityInHands(item))
1504 controlledPlayer.PredictiveTakeEntityToHands(item);
1505 }
1506 }
1507
1508 HideOwnedTooltip();
1509
1510 name = w.GetName();
1511 name.Replace("PanelWidget", "Temperature");
1512 w.FindAnyWidget(name).Show(false);
1513 }
1514 }
1515 }
PlayerSpawnPresetDiscreteItemSetSlotData name
one set for cargo
DayZGame g_Game
Definition DayZGame.c:3746
FindInventoryLocationType
flags for searching locations in inventory
Definition InventoryLocation.c:16
Definition gameplay.c:276
Definition PlayerBaseClient.c:2
MouseState
Definition EnSystem.c:311

Перекрестные ссылки g_Game, GetGame(), GetPlayer() и name.

◆ DraggingOverGrid()

bool DraggingOverGrid ( Widget w,
int x,
int y,
Widget reciever,
CargoContainer cargo )
inlineprotected
1061 {
1062 EntityAI item_in_hands = GetGame().GetPlayer().GetHumanInventory().GetEntityInHands();
1063 if( w == null )
1064 {
1065 return false;
1066 }
1068 if( !item || !item_in_hands )
1069 {
1070 return false;
1071 }
1072
1073 int color;
1074 int idx = 0;
1075 int c_x, c_y;
1076
1077 if( item_in_hands.GetInventory().GetCargo() )
1078 {
1079 c_x = item_in_hands.GetInventory().GetCargo().GetHeight();
1080 c_y = item_in_hands.GetInventory().GetCargo().GetWidth();
1081 }
1082
1083 if( c_x > x && c_y > y && item_in_hands.GetInventory().CanAddEntityInCargoEx( item, 0, x, y, item.GetInventory().GetFlipCargo() ) )
1084 {
1085 ItemManager.GetInstance().HideDropzones();
1086 ItemManager.GetInstance().GetCenterDropzone().SetAlpha( 1 );
1088 }
1089 else
1090 {
1092 ItemManager.GetInstance().ShowSourceDropzone( item );
1093 }
1094
1095 if( w.FindAnyWidget("Cursor") )
1096 {
1097 w.FindAnyWidget("Cursor").SetColor( color );
1098 }
1099 else
1100 {
1101 string name = w.GetName();
1102 name.Replace( "PanelWidget", "Cursor" );
1103 w.FindAnyWidget( name ).SetColor( color );
1104 }
1105
1106 return true;
1107 }
Icon x
Icon y
Definition ColorManager.c:2
static int GREEN_COLOR
Definition ColorManager.c:17
static int RED_COLOR
Definition ColorManager.c:16
EntityAI GetItemPreviewItem(Widget w)
Definition HandsContainer.c:431

Перекрестные ссылки GetGame(), ItemManager::GetInstance(), GetItemPreviewItem(), ColorManager::GREEN_COLOR, name, ColorManager::RED_COLOR, x и y.

◆ DraggingOverHeader()

override void DraggingOverHeader ( Widget w,
int x,
int y,
Widget receiver )
inlineprotected
455 {
456 if( w == null )
457 {
458 return;
459 }
462 int slot_id = -1;
463
464 string name = w.GetName();
465 name.Replace( "PanelWidget", "Render" );
466
467 ItemPreviewWidget w_ipw = ItemPreviewWidget.Cast( w.FindAnyWidget( name ) );
468 if( w_ipw == null )
469 {
470 w_ipw = ItemPreviewWidget.Cast( w.FindAnyWidget( "Render" ) );
471 }
472 if( w_ipw == null )
473 {
474 return;
475 }
476
478 receiver.GetUserData(slots_icon);
479
480 if(slots_icon)
481 {
482 receiver_item = slots_icon.GetEntity();
483 slot_id = slots_icon.GetSlotID();
484 slot_owner = slots_icon.GetSlotParent();
485 }
486
487
489 InventoryItem receiver_entity = InventoryItem.Cast( p.GetHumanInventory().GetEntityInHands() );
490 InventoryItem w_entity = InventoryItem.Cast( w_ipw.GetItem() );
491 if( !w_entity )
492 {
493 return;
494 }
495
496 if( receiver_entity )
497 {
498 if( receiver_item )
499 {
502 if( receiver_itemIB && itemIB && receiver_itemIB.CanBeCombined( itemIB ) )
503 {
504 ItemManager.GetInstance().HideDropzones();
505 if( m_Entity.GetHierarchyRootPlayer() == GetGame().GetPlayer() )
506 {
507 ItemManager.GetInstance().GetRightDropzone().SetAlpha( 1 );
508 }
509 else
510 {
511 ItemManager.GetInstance().GetLeftDropzone().SetAlpha( 1 );
512 }
514 }
515 else
516 {
519 Weapon_Base wpn = Weapon_Base.Cast(receiver_item.GetHierarchyParent());
520
521 if( wpn && mag )
522 {
523 if( player.GetWeaponManager().CanSwapMagazine( wpn, Magazine.Cast(w_entity) ) )
524 {
526 if( w_entity.GetHierarchyRootPlayer() == player )
527 {
528 ItemManager.GetInstance().GetRightDropzone().SetAlpha( 1 );
529 }
530 else
531 {
532 ItemManager.GetInstance().GetLeftDropzone().SetAlpha( 1 );
533 }
534 }
535 else
536 {
538 ItemManager.GetInstance().ShowSourceDropzone( w_entity );
539 }
540 }
541 else
542 {
544 {
545 ItemManager.GetInstance().HideDropzones();
546 if( m_Entity.GetHierarchyRootPlayer() == GetGame().GetPlayer() )
547 {
548 ItemManager.GetInstance().GetRightDropzone().SetAlpha( 1 );
549 }
550 else
551 {
552 ItemManager.GetInstance().GetLeftDropzone().SetAlpha( 1 );
553 }
555 }
556 else if( receiver_itemIB.GetInventory().CanAddAttachment( w_entity ) )
557 {
558 ItemManager.GetInstance().HideDropzones();
559 if( receiver_itemIB.GetHierarchyRootPlayer() == GetGame().GetPlayer() )
560 {
561 ItemManager.GetInstance().GetRightDropzone().SetAlpha( 1 );
562 }
563 else
564 {
565 ItemManager.GetInstance().GetLeftDropzone().SetAlpha( 1 );
566 }
568 }
569 }
570 }
571 }
572 else if( slot_owner && slot_owner.GetInventory().CanAddAttachment( w_entity ) )
573 {
574 ItemManager.GetInstance().HideDropzones();
575 ItemManager.GetInstance().GetCenterDropzone().SetAlpha( 1 );
577 }
578 else if( receiver_entity.GetInventory().CanAddAttachment( w_entity ) )
579 {
580 ItemManager.GetInstance().HideDropzones();
581 if( receiver_entity.GetHierarchyRootPlayer() == GetGame().GetPlayer() )
582 {
583 ItemManager.GetInstance().GetRightDropzone().SetAlpha( 1 );
584 }
585 else
586 {
587 ItemManager.GetInstance().GetLeftDropzone().SetAlpha( 1 );
588 }
590 }
591 else
592 {
594 ItemManager.GetInstance().ShowSourceDropzone( w_entity );
595 }
596 }
597 else
598 {
599 /*if( m_HandsIcon )
600 {
601 ColorManager.GetInstance().SetColor( w, ColorManager.SWAP_COLOR );
602 ItemManager.GetInstance().HideDropzones();
603 ItemManager.GetInstance().GetCenterDropzone().SetAlpha( 1 );
604 }
605
606 else
607 {*/
609 ItemManager.GetInstance().ShowSourceDropzone( w_entity );
610 //}
611 }
612 }
static ColorManager GetInstance()
Definition ColorManager.c:27
static int SWAP_COLOR
Definition ColorManager.c:18
static int COMBINE_COLOR
Definition ColorManager.c:20
script counterpart to engine's class Inventory
Definition Inventory.c:79
static bool CanSwapEntitiesEx(notnull EntityAI item1, notnull EntityAI item2)
Definition Inventory.c:628
Definition ItemBase.c:14
Definition SlotsIcon.c:2
shorthand
Definition BoltActionRifle_Base.c:6

Перекрестные ссылки GameInventory::CanSwapEntitiesEx(), ColorManager::COMBINE_COLOR, GetGame(), ColorManager::GetInstance(), ItemManager::GetInstance(), GetPlayer(), ColorManager::GREEN_COLOR, m_Entity, name, ColorManager::RED_COLOR и ColorManager::SWAP_COLOR.

Используется в DraggingOverHeader2().

◆ DraggingOverHeader2()

void DraggingOverHeader2 ( Widget w,
int x,
int y,
Widget receiver )
inlineprotected
1518 {
1520 }
override void DraggingOverHeader(Widget w, int x, int y, Widget receiver)
Definition HandsContainer.c:454

Перекрестные ссылки DraggingOverHeader(), x и y.

◆ DropReceived()

void DropReceived ( Widget w,
int x,
int y,
CargoContainer cargo )
inlineprotected
972 {
974 EntityAI item_in_hands = player.GetHumanInventory().GetEntityInHands();
975
977 if( !item )
978 {
979 return;
980 }
981
982 int idx = 0;
983 int c_x, c_y;
984
987
988 if( cargo == m_CargoGrid )
989 {
991 target_cargo = m_Entity.GetInventory().GetCargo();
992 #ifdef PLATFORM_CONSOLE
993 if( m_CargoGrid.HasItem( item ) )
994 {
995 return;
996 }
997 #endif
998 }
999 else
1000 {
1001 target_entity = m_AttachmentCargos.GetKeyByValue( cargo );
1002 if( target_entity )
1003 {
1004 target_cargo = target_entity.GetInventory().GetCargo();
1005 #ifdef PLATFORM_CONSOLE
1006 if( cargo.HasItem( item ) )
1007 {
1008 return;
1009 }
1010 #endif
1011 }
1012 else
1013 return;
1014 }
1015
1017 {
1018 c_x = target_cargo.GetHeight();
1019 c_y = target_cargo.GetWidth();
1020 }
1021 else
1022 return;
1023
1025 #ifdef PLATFORM_CONSOLE
1026 x = 0;
1027 y = target_cargo.GetItemCount();
1028 target_entity.GetInventory().FindFreeLocationFor( item, FindInventoryLocationType.CARGO, dst );
1029 #else
1030 dst.SetCargoAuto(target_cargo, item, x, y, item.GetInventory().GetFlipCargo());
1031 #endif
1032
1034 item.GetInventory().GetCurrentInventoryLocation(src);
1035 if(src.CompareLocationOnly(dst) && src.GetFlip() == dst.GetFlip())
1036 return;
1037
1038 #ifdef PLATFORM_CONSOLE
1039 if(dst.IsValid() && target_entity.GetInventory().LocationCanAddEntity(dst))
1040 #else
1041 if( c_x > x && c_y > y && target_entity.GetInventory().LocationCanAddEntity(dst))
1042 #endif
1043 {
1045
1046 Icon icon = cargo.GetIcon( item );
1047
1048 if( icon )
1049 {
1050 if( w && w.FindAnyWidget("Cursor") )
1051 w.FindAnyWidget("Cursor").SetColor( ColorManager.BASE_COLOR );
1052 icon.Refresh();
1053 Refresh();
1054 }
1055 }
1056 ItemManager.GetInstance().HideDropzones();
1057 ItemManager.GetInstance().SetIsDragging( false );
1058 }
represents base for cargo storage for entities
Definition Cargo.c:7
static int BASE_COLOR
Definition ColorManager.c:15
Definition Icon.c:2
InventoryLocation.
Definition InventoryLocation.c:28
Definition SplitItemUtils.c:2
static void TakeOrSplitToInventoryLocation(notnull PlayerBase player, notnull InventoryLocation dst)
Definition SplitItemUtils.c:34

Перекрестные ссылки ColorManager::BASE_COLOR, GetGame(), ItemManager::GetInstance(), GetItemPreviewItem(), GetPlayer(), m_AttachmentCargos, m_CargoGrid, m_Entity, Refresh(), SplitItemUtils::TakeOrSplitToInventoryLocation(), x и y.

◆ ElectricityIcon()

void ElectricityIcon ( )
inlineprotected
1523 {
1524 EntityAI item_in_hands = GetGame().GetPlayer().GetHumanInventory().GetEntityInHands();
1525 if( item_in_hands && item_in_hands.GetCompEM() )
1526 {
1527 if( GetRootWidget().FindAnyWidget( "electricity" ) )
1528 {
1529 bool show_electricity_icon = item_in_hands.GetCompEM().HasElectricityIcon();
1530 GetRootWidget().FindAnyWidget( "electricity" ).Show( show_electricity_icon );
1531 }
1532
1533 if( GetRootWidget().FindAnyWidget( "electricity_can_work" ) )
1534 {
1535 bool show_electricity_can_work_icon = item_in_hands.GetCompEM().CanWork() && !item_in_hands.IsRuined();
1536 GetRootWidget().FindAnyWidget( "electricity_can_work" ).Show( show_electricity_can_work_icon );
1537 }
1538 }
1539 else
1540 {
1541 GetRootWidget().FindAnyWidget( "electricity" ).Show( false );
1542 }
1543 }
proto native Widget FindAnyWidget(string pathname)

Перекрестные ссылки FindAnyWidget() и GetGame().

Используется в UpdateInterval().

◆ EquipItem()

override bool EquipItem ( )
inlineprotected
236 {
237 if (CanEquip())
238 {
239 if (m_ActiveIndex == 0)
240 {
241 ItemBase item_in_hands = ItemBase.Cast( GetGame().GetPlayer().GetHumanInventory().GetEntityInHands() );
242 if ( item_in_hands )
243 {
244 if ( GetGame().GetPlayer().GetHumanInventory().CanRemoveEntityInHands() && !GetGame().GetPlayer().GetInventory().HasInventoryReservation(item_in_hands, null) )
245 {
246 if ( GetGame().GetPlayer().PredictiveTakeEntityToInventory( FindInventoryLocationType.ATTACHMENT, item_in_hands ) )
247 {
248 m_MainWidget.FindAnyWidget("Cursor").Show( false );
249 m_MainWidget.FindAnyWidget("hands_preview_root").SetAlpha( 0.7 );
250 return true;
251 }
252 }
253 }
254 }
255 else if (GetFocusedContainer())
256 {
257 return GetFocusedContainer().EquipItem();
258 }
259 }
260 return false;
261 }

Перекрестные ссылки GetGame() и GetPlayer().

◆ GetCombinationFlags()

int GetCombinationFlags ( EntityAI entity1,
EntityAI entity2 )
inlineprotected
786 {
787 int flags = 0;
789 EntityAI entity_in_hands = m_player.GetHumanInventory().GetEntityInHands();
790
791 if (!entity1 || !entity2) return flags;
792
795 bool skipSwap = false;
796
798 {
800
801 if (Class.CastTo(parentWpn, swapmag1.GetHierarchyParent()))
802 {
803 skipSwap = true;
805 flags = flags | InventoryCombinationFlags.SWAP;
806 }
807
808 if (Class.CastTo(parentWpn, swapmag2.GetHierarchyParent()))
809 {
810 skipSwap = true;
812 flags = flags | InventoryCombinationFlags.SWAP;
813
814 }
815 }
816
817 if ( !skipSwap )
818 {
819 if (entity1 == m_player.GetHumanInventory().GetEntityInHands() ) flags = flags | InventoryCombinationFlags.TAKE_TO_HANDS;
821 {
822 if (!entity1.IsInherited( ZombieBase ) && !entity1.IsInherited( Car ))
823 {
824 flags = flags | InventoryCombinationFlags.SWAP;
825 }
826 }
827 }
828
829 if (entity1.IsInherited( ItemBase) && entity2.IsInherited( ItemBase ))
830 {
831 ItemBase ent1 = ItemBase.Cast( entity1 );
832 if (ent1.CanBeCombined( ItemBase.Cast( entity2 ) )) flags = flags | InventoryCombinationFlags.COMBINE_QUANTITY2;
833 }
834
835 else if (entity1.GetInventory().CanAddAttachment( entity2 ))
836 {
837 if (!entity1.IsInherited( ZombieBase ) && !entity1.IsInherited( Car ) && !entity2.IsInherited( ZombieBase ) && !entity2.IsInherited( Car ))
838 {
840 }
841 }
842 if (!entity1.GetInventory().HasEntityInInventory(entity2) && entity1.GetInventory().CanAddEntityInCargo( entity2, entity2.GetInventory().GetFlipCargo() )) flags = flags | InventoryCombinationFlags.ADD_AS_CARGO;
843
844 if (entity1 == m_player.GetHumanInventory().GetEntityInHands() || entity2 == m_player.GetHumanInventory().GetEntityInHands())
845 {
847 Class.CastTo(amc, m_player.GetActionManager());
848 if (entity1 == m_player.GetHumanInventory().GetEntityInHands())
849 {
850 if (amc.CanSetActionFromInventory( ItemBase.Cast( entity1 ), ItemBase.Cast( entity2 ) ))
851 {
853 }
854 }
855 else
856 {
857 if (amc.CanSetActionFromInventory( ItemBase.Cast( entity2 ), ItemBase.Cast( entity1 ) ))
858 {
860 }
861 }
862 }
863
864 if (GetRecipeCount( true, entity1, entity2 ) > 0)
865 {
867 }
868 return flags;
869 }
DayZPlayer m_player
Definition RandomGeneratorSyncManager.c:15
Definition ActionManagerClient.c:5
Super root of all classes in Enforce script.
Definition EnScript.c:11
WeaponManager GetWeaponManager()
Definition DayZPlayerImplement.c:962
int GetRecipeCount(bool recipe_anywhere, EntityAI entity1, EntityAI entity2)
Definition HandsContainer.c:871
Definition InventoryCombinationFlags.c:2
static const int TAKE_TO_HANDS
Definition InventoryCombinationFlags.c:11
static const int ADD_AS_CARGO
Definition InventoryCombinationFlags.c:5
static const int SWAP
Definition InventoryCombinationFlags.c:6
static const int ADD_AS_ATTACHMENT
Definition InventoryCombinationFlags.c:4
static const int COMBINE_QUANTITY2
Definition InventoryCombinationFlags.c:13
static const int SET_ACTION
Definition InventoryCombinationFlags.c:19
static const int RECIPE_ANYWHERE
Definition InventoryCombinationFlags.c:14
bool CanSwapMagazine(Weapon_Base wpn, Magazine mag, bool reservationCheck=true)
Definition WeaponManager.c:133
Definition ZombieFemaleBase.c:2
static proto bool CastTo(out Class to, Class from)
Try to safely down-cast base class to child class.

Перекрестные ссылки InventoryCombinationFlags::ADD_AS_ATTACHMENT, InventoryCombinationFlags::ADD_AS_CARGO, GameInventory::CanSwapEntitiesEx(), WeaponManager::CanSwapMagazine(), Class::CastTo(), InventoryCombinationFlags::COMBINE_QUANTITY2, GetGame(), GetPlayer(), GetRecipeCount(), DayZPlayer::GetWeaponManager(), m_player, InventoryCombinationFlags::RECIPE_ANYWHERE, InventoryCombinationFlags::SET_ACTION, InventoryCombinationFlags::SWAP и InventoryCombinationFlags::TAKE_TO_HANDS.

◆ GetHeader()

override Header GetHeader ( )
inlineprotected
63 {
65 }

Перекрестные ссылки m_CollapsibleHeader.

Используется в HandsPreview::CreateNewIcon().

◆ GetItemPreviewItem()

EntityAI GetItemPreviewItem ( Widget w)
inlineprotected
432 {
433 ItemPreviewWidget ipw = ItemPreviewWidget.Cast( w.FindAnyWidget( "Render" ) );
434 if( !ipw )
435 {
436 string name = w.GetName();
437 name.Replace( "PanelWidget", "Render" );
438 ipw = ItemPreviewWidget.Cast( w.FindAnyWidget( name ) );
439 }
440
441 if( !ipw )
442 {
443 ipw = ItemPreviewWidget.Cast( w );
444 }
445
446 if( !ipw )
447 {
448 return null;
449 }
450
451 return ipw.GetItem();
452 }

Перекрестные ссылки name.

Используется в DraggingOverGrid(), DropReceived() и TakeAsAttachment().

◆ GetRecipeCount()

int GetRecipeCount ( bool recipe_anywhere,
EntityAI entity1,
EntityAI entity2 )
inlineprotected
872 {
873 PluginRecipesManager plugin_recipes_manager = PluginRecipesManager.Cast( GetPlugin( PluginRecipesManager ) );
874 return plugin_recipes_manager.GetValidRecipes( ItemBase.Cast( entity1 ), ItemBase.Cast( entity2 ), null, PlayerBase.Cast( GetGame().GetPlayer() ) );
875 }
PluginBase GetPlugin(typename plugin_type)
Definition PluginManager.c:316

Перекрестные ссылки GetGame(), GetPlayer() и GetPlugin().

Используется в GetCombinationFlags().

◆ HideCargo()

void HideCargo ( )
inlineprotected
1572 {
1573 if( m_CargoGrid )
1574 {
1575 m_CargoGrid.OnHide();
1576 RecomputeOpenedContainers();
1577 }
1578 }

Перекрестные ссылки m_CargoGrid.

Используется в ShowAtt() и UpdateInterval().

◆ Insert()

override void Insert ( LayoutHolder container,
int pos = -1,
bool immedUpdate = true )
inlineprotected
183 {
184 super.Insert( container, pos, immedUpdate );
185 }

Используется в AttachmentAdded() и ShowAtt().

◆ InspectItem()

override bool InspectItem ( )
inlineprotected
380 {
381 if(m_ActiveIndex == 0)
382 {
384 EntityAI item_in_hands = player.GetHumanInventory().GetEntityInHands();
385 if( item_in_hands )
386 {
388 return true;
389 }
390 }
391 else if( GetFocusedContainer() )
392 {
393 return GetFocusedContainer().InspectItem();
394 }
395 return false;
396 }
override bool InspectItem()
Definition HandsContainer.c:379

Перекрестные ссылки GetGame(), GetPlayer() и InspectItem().

Используется в InspectItem() и MouseClick2().

◆ IsEmpty()

override bool IsEmpty ( )
inlineprotected
347 {
349 return player.GetHumanInventory().GetEntityInHands() == null;
350 }

Перекрестные ссылки GetGame() и GetPlayer().

Используется в IsItemActive() и IsItemWithQuantityActive().

◆ IsItemActive()

override bool IsItemActive ( )
inlineprotected
325 {
327 ItemBase item = ItemBase.Cast( player.GetHumanInventory().GetEntityInHands() );
328 if( item == null )
329 {
330 return false;
331 }
332 return !IsEmpty() && ( !QuantityConversions.HasItemQuantity( item ) || ( QuantityConversions.HasItemQuantity( item ) && !item.CanBeSplit() ) );
333 }
override bool IsEmpty()
Definition HandsContainer.c:346
Definition QuantityConversions.c:2
static int HasItemQuantity(notnull EntityAI item)
Definition QuantityConversions.c:143

Перекрестные ссылки GetGame(), GetPlayer(), QuantityConversions::HasItemQuantity() и IsEmpty().

◆ IsItemWithQuantityActive()

override bool IsItemWithQuantityActive ( )
inlineprotected
336 {
338 ItemBase item = ItemBase.Cast( player.GetHumanInventory().GetEntityInHands() );
339 if( item == null )
340 {
341 return false;
342 }
343 return !IsEmpty() && QuantityConversions.HasItemQuantity( item ) && item.CanBeSplit();
344 }

Перекрестные ссылки GetGame(), GetPlayer(), QuantityConversions::HasItemQuantity() и IsEmpty().

◆ IsLastIndex()

override bool IsLastIndex ( )
inlineprotected
68 {
69 return m_ActiveIndex == m_OpenedContainers.Count() - 1;
70 }

◆ MouseClick2()

void MouseClick2 ( Widget w,
int x,
int y,
int button )
inlineprotected
1418 {
1419 string name = w.GetName();
1420 name.Replace("PanelWidget", "Render");
1421 ItemPreviewWidget itemPreview = ItemPreviewWidget.Cast(w.FindAnyWidget(name));
1422
1423 if (itemPreview)
1424 {
1425 ItemBase selectedItem = ItemBase.Cast(itemPreview.GetItem());
1426
1427 if (selectedItem)
1428 {
1429 switch (button)
1430 {
1431 case MouseState.RIGHT:
1432 #ifdef DIAG_DEVELOPER
1433 if (g_Game.IsLeftCtrlDown())
1434 ShowActionMenu(selectedItem);
1435 #endif
1436
1437 break;
1438
1439 case MouseState.MIDDLE:
1441 break;
1442
1443 case MouseState.LEFT:
1445 if (g_Game.IsLeftCtrlDown())
1446 {
1447 if (controlledPlayer.CanDropEntity(selectedItem))
1448 {
1449 if (selectedItem.GetTargetQuantityMax() < selectedItem.GetQuantity())
1450 selectedItem.SplitIntoStackMaxClient(null, -1);
1451 else
1452 controlledPlayer.PhysicalPredictiveDropItem(selectedItem);
1453 }
1454 else
1455 {
1456 bool draggable = !controlledPlayer.GetInventory().HasInventoryReservation(selectedItem, null ) && !controlledPlayer.GetInventory().IsInventoryLocked() && selectedItem.GetInventory().CanRemoveEntity() && !controlledPlayer.IsItemsToDelete();
1457 ItemManager.GetInstance().SetWidgetDraggable(w, draggable);
1458 }
1459 }
1460
1461 break;
1462 }
1463 }
1464 }
1465 }

Перекрестные ссылки g_Game, GetGame(), ItemManager::GetInstance(), GetPlayer(), InspectItem() и name.

◆ OnDropReceivedFromHeader()

override void OnDropReceivedFromHeader ( Widget w,
int x,
int y,
Widget receiver )
inlineprotected
781 {
783 }
void TakeAsAttachment(Widget w, Widget receiver)
Definition HandsContainer.c:1109

Перекрестные ссылки TakeAsAttachment().

◆ OnDropReceivedFromHeader2()

void OnDropReceivedFromHeader2 ( Widget w,
int x,
int y,
Widget receiver )
inlineprotected
615 {
617 }

Перекрестные ссылки TakeAsAttachment().

◆ OnPerformCombination()

void OnPerformCombination ( int combinationFlags)
inlineprotected
620 {
622 if ( m_am_entity1 == null || m_am_entity2 == null ) return;
623
625
627 {
629 if ( Class.CastTo(mag, m_am_entity2 ) )
630 {
632 return;
633 }
634 }
635
637 {
638 if( m_Atts )
639 {
640 m_Body.RemoveItem( m_Atts.GetWrapper() );
641 delete m_Atts;
642 }
643 if( m_am_entity2.GetSlotsCountCorrect() > 0 )
644 {
645 m_Atts = new Attachments( this, m_am_entity2 );
646 m_Atts.InitAttachmentGrid( 1 );
647
648 }
649
650 Refresh();
651 m_Parent.Refresh();
652
655 if ( Class.CastTo(wpn1, m_am_entity1 ) && Class.CastTo(mag1, m_am_entity2 ) )
656 {
658 {
660 return;
661 }
662 }
663
664 SplitItemUtils.TakeOrSplitToInventory(m_player, m_am_entity1, m_am_entity2);
665 //m_player.PredictiveTakeEntityToTargetAttachment( m_am_entity1, m_am_entity2 );
666 }
667
669 {
670 m_player.PredictiveTakeEntityToTargetCargo( m_am_entity1, m_am_entity2 );
671 }
672
674 {
677 if (Class.CastTo(swapmag1, m_am_entity1) && Class.CastTo(swapmag2, m_am_entity2 ) )
678 {
679 if( m_player.GetWeaponManager().CanSwapMagazine( Weapon_Base.Cast( swapmag1.GetParent() ), Magazine.Cast( swapmag2 ) ) )
680 {
682 return;
683 }
684
686 {
688 return;
689 }
690 }
691 if ( !m_player.PredictiveSwapEntities( m_am_entity1, m_am_entity2 ) && m_player.GetHumanInventory().CanAddEntityInHands( m_am_entity1 ) )
692 {
693 m_player.PredictiveTakeEntityToHands( m_am_entity1 );
694 }
695 }
696
698 {
699 if ( m_Atts )
700 {
701 m_Body.RemoveItem( m_Atts.GetWrapper() );
702 delete m_Atts;
703 }
704
705 if ( m_am_entity2.GetSlotsCountCorrect() > 0 )
706 {
707 m_Atts = new Attachments( this, m_am_entity2 );
708 m_Atts.InitAttachmentGrid( 1 );
709
710 }
711 Refresh();
712 m_Parent.Refresh();
713
714 if ( m_player.GetHumanInventory().CanAddEntityInHands( m_am_entity2 ) )
715 {
716 m_player.PredictiveTakeEntityToHands( m_am_entity2 );
717 }
718 }
719 }
static const int NONE
Definition InventoryCombinationFlags.c:3
static const int LOAD_CHAMBER
Definition InventoryCombinationFlags.c:16
static void TakeOrSplitToInventory(notnull PlayerBase player, notnull EntityAI target, notnull EntityAI item)
Definition SplitItemUtils.c:3
bool CanAttachMagazine(Weapon_Base wpn, Magazine mag, bool reservationCheck=true)
Definition WeaponManager.c:92
bool AttachMagazine(Magazine mag, ActionBase control_action=NULL)
Definition WeaponManager.c:341
bool LoadBullet(Magazine mag, ActionBase control_action=NULL)
Definition WeaponManager.c:366
bool SwapMagazine(Magazine mag, ActionBase control_action=NULL)
Definition WeaponManager.c:351

Перекрестные ссылки InventoryCombinationFlags::ADD_AS_ATTACHMENT, InventoryCombinationFlags::ADD_AS_CARGO, WeaponManager::AttachMagazine(), WeaponManager::CanAttachMagazine(), WeaponManager::CanSwapMagazine(), Class::CastTo(), GetGame(), GetPlayer(), DayZPlayer::GetWeaponManager(), InventoryCombinationFlags::LOAD_CHAMBER, WeaponManager::LoadBullet(), m_Atts, m_Parent, m_player, InventoryCombinationFlags::NONE, Refresh(), InventoryCombinationFlags::SWAP, WeaponManager::SwapMagazine(), InventoryCombinationFlags::TAKE_TO_HANDS и SplitItemUtils::TakeOrSplitToInventory().

◆ OnSelectButton()

override bool OnSelectButton ( )
inlineprotected
399 {
400 if(m_ActiveIndex == 0)
401 {
402 if (ItemManager.GetInstance().IsMicromanagmentMode())
403 {
404 EntityAI selectedItem = ItemManager.GetInstance().GetSelectedItem();
406 {
407 Inventory.GetInstance().DisableMicromanagement();
408 return true;
409 }
410 else
411 {
412 return Select();
413 }
414 }
415 else
416 {
417 Inventory.GetInstance().EnableMicromanagement();
418 return true;
419 }
420 }
421 else
422 {
423 if( GetFocusedContainer() )
424 {
425 return GetFocusedContainer().OnSelectButton();
426 }
427 }
428 return false;
429 }
override bool Select()
Definition CargoContainer.c:867
override EntityAI GetFocusedItem()
Definition CargoContainer.c:720

Перекрестные ссылки Container::GetFocusedItem(), ItemManager::GetInstance(), Inventory() и Container::Select().

◆ OnShow()

override void OnShow ( )
inlineprotected
1408 {
1409 super.OnShow();
1410
1411 for ( int i = 0; i < m_Body.Count(); i++ )
1412 {
1413 m_Body.Get( i ).OnShow();
1414 }
1415 }

◆ Refresh()

override void Refresh ( )
inlineprotected
319 {
320 super.Refresh();
322 }
bool m_IsActive
Definition ModifierBase.c:20
void SetActive()
Definition TrapBase.c:437

Перекрестные ссылки m_IsActive и SetActive().

Используется в DestroyAtt(), DestroyCargo(), DropReceived(), OnPerformCombination(), RefreshHands() и ShowAtt().

◆ RefreshHands()

void RefreshHands ( )
inlineprotected
1273 {
1274 for (int i = 0; i < m_Body.Count(); i++)
1275 {
1276 m_Body.Get( i ).OnShow();
1277 }
1278 Refresh();
1279 m_Parent.Refresh();
1280 }

Перекрестные ссылки m_Parent и Refresh().

◆ RemoveItem()

void RemoveItem ( )
inlineprotected
878 {
879 m_Entity = null;
880 m_CollapsibleHeader.ShowCollapseButtons( false, true );
881 }

Перекрестные ссылки m_CollapsibleHeader и m_Entity.

◆ ResetContainer()

void ResetContainer ( )
inlineprotected
57 {
58 m_Body.Clear();
59 m_Body.Insert( m_HandsPreview );
60 }

Перекрестные ссылки m_HandsPreview.

Используется в ShowAtt().

◆ ScrollToActiveContainer()

void ScrollToActiveContainer ( Container active_container)
inlineprotected
161 {
162 if( !active_container )
163 return;
164 float x, y, y_s;
165 m_ScrollWidget.GetScreenPos( x, y );
166 m_ScrollWidget.GetScreenSize( x, y_s );
167 float amount;
168 float next_pos = active_container.GetFocusedContainerYScreenPos( true ) + active_container.GetFocusedContainerHeight( true );
169
170 if( next_pos > ( y + y_s ) )
171 {
172 amount = y + active_container.GetFocusedContainerYScreenPos( true );
173 m_ScrollWidget.VScrollToPos( m_ScrollWidget.GetVScrollPos() + active_container.GetFocusedContainerHeight( true ) + 2 );
174 }
175 else if( active_container.GetFocusedContainerYScreenPos( true ) < y )
176 {
177 amount = active_container.GetFocusedContainerYScreenPos( true ) - y;
178 m_ScrollWidget.VScrollToPos( m_ScrollWidget.GetVScrollPos() + amount - 2 );
179 }
180 }

Перекрестные ссылки m_ScrollWidget, x и y.

Используется в SetFocusToIndex().

◆ SetActive()

override void SetActive ( bool active)
inlineprotected
264 {
265 super.SetActive(active);
267 EntityAI item_in_hands = player.GetHumanInventory().GetEntityInHands();
268
269 if( item_in_hands )
270 {
271 if( m_MainWidget.FindAnyWidget( "Cursor" ) )
272 {
273 m_MainWidget.FindAnyWidget( "Cursor" ).Show( active );
274 }
275
276 if( active )
277 {
278 float x, y;
279 GetMainWidget().GetScreenPos( x, y );
280 PrepareOwnedTooltip( item_in_hands, -1, y );
281 }
282 }
283 else
284 {
285 if (active)
286 m_MainWidget.FindAnyWidget( "hands_preview_root" ).SetAlpha( 0.85 );
287 else
288 m_MainWidget.FindAnyWidget( "hands_preview_root" ).SetAlpha( 0.7 );
289 }
290 }

Перекрестные ссылки GetGame(), GetPlayer(), x и y.

◆ SetFocusToIndex()

void SetFocusToIndex ( )
inlineprotected
73 {
74 int index = m_ActiveIndex - 1;
76 int cargo_start_index = -1;
77 int attachment_end_index = -1;
78 int cargo_end_index = -1;
79
80 if ( m_Atts || m_AttachmentAttachments.Count() > 0 )
81 {
83 if ( m_Atts )
86 }
87
88 if ( m_CargoGrid || m_AttachmentCargos.Count() > 0 )
89 {
91 if ( m_CargoGrid )
94 }
95
96 if ( m_ActiveIndex > m_OpenedContainers.Count() )
97 {
98 m_ActiveIndex = m_OpenedContainers.Count();
99 }
100
101 if ( index == -1 )
102 {
103 #ifdef PLATFORM_CONSOLE
104 if ( m_MainWidget.FindAnyWidget("Cursor") )
105 m_MainWidget.FindAnyWidget("Cursor").Show( true );
106 #endif
107 m_ScrollWidget.VScrollToPos01( 0 );
108 }
109 else
110 {
111 if( index.InRange( 0, attachment_end_index ) )
112 {
113 if( m_Atts )
114 {
115 if( index == 0 )
116 {
117 m_Atts.SetDefaultFocus();
118 SetFocusedContainer( m_Atts.GetWrapper() );
119 }
120 else
121 {
122 m_AttachmentAttachments.GetElement( index - 1 ).SetDefaultFocus();
123 SetFocusedContainer( m_AttachmentAttachments.GetElement( index - 1 ).GetWrapper() );
124 }
125 }
126 else
127 {
128 m_AttachmentAttachments.GetElement( index ).SetDefaultFocus();
129 SetFocusedContainer( m_AttachmentAttachments.GetElement( index ).GetWrapper() );
130 }
131 }
132 else if( index.InRange( cargo_start_index, cargo_end_index ) )
133 {
134 if( m_CargoGrid )
135 {
136 if( index == cargo_start_index )
137 {
138 m_CargoGrid.SetDefaultFocus();
139 SetFocusedContainer( m_CargoGrid );
140 }
141 else
142 {
143 m_AttachmentCargos.GetElement( index - 1 - cargo_start_index ).SetDefaultFocus();
144 SetFocusedContainer( m_AttachmentCargos.GetElement( index - 1 - cargo_start_index ) );
145 }
146 }
147 else
148 {
149 m_AttachmentCargos.GetElement( index - cargo_start_index ).SetDefaultFocus();
150 SetFocusedContainer( m_AttachmentCargos.GetElement( index - cargo_start_index ) );
151 }
152 }
153
154 if( m_MainWidget.FindAnyWidget("Cursor") )
155 m_MainWidget.FindAnyWidget("Cursor").Show( false );
156 ScrollToActiveContainer( GetFocusedContainer() );
157 }
158 }
void ScrollToActiveContainer(Container active_container)
Definition HandsContainer.c:160

Перекрестные ссылки m_AttachmentAttachments, m_AttachmentCargos, m_Atts, m_CargoGrid, m_ScrollWidget и ScrollToActiveContainer().

◆ SetLastActive()

override void SetLastActive ( )
inlineprotected
293 {
294 super.SetLastActive();
296 EntityAI item_in_hands = player.GetHumanInventory().GetEntityInHands();
297
298 if( item_in_hands )
299 {
300 if ( m_ActiveIndex == 0)
301 {
302 if( m_MainWidget.FindAnyWidget( "Cursor" ) )
303 {
304 m_MainWidget.FindAnyWidget( "Cursor" ).Show( true );
305 }
306
307 float x, y;
308 GetMainWidget().GetScreenPos( x, y );
309 PrepareOwnedTooltip( item_in_hands, x, y );
310 }
311 }
312 else
313 {
314 m_MainWidget.FindAnyWidget( "hands_preview_root" ).SetAlpha( 0.85 );
315 }
316 }

Перекрестные ссылки GetGame(), GetPlayer(), x и y.

◆ SetLayoutName()

override void SetLayoutName ( )
inlineprotected
1403 {
1404 m_LayoutName = WidgetLayoutName.ClosableContainer;
1405 }
Definition WidgetLayoutName.c:2
const string ClosableContainer
Definition WidgetLayoutName.c:49

Перекрестные ссылки WidgetLayoutName::ClosableContainer.

◆ ShowActionMenuCombine()

void ShowActionMenuCombine ( EntityAI entity1,
EntityAI entity2,
int combinationFlags )
inlineprotected
722 {
723 if ( entity1 && entity2 ) PrintString( "Showing action menu for " + entity1.GetDisplayName() + " and " + entity2.GetDisplayName() );
724
725 ContextMenu cmenu = ContextMenu.Cast(GetGame().GetUIManager().GetMenu().GetContextMenu());
726 m_am_entity1 = entity1;
727 m_am_entity2 = entity2;
728 cmenu.Hide();
729 cmenu.Clear();
730
732 {
734 entity.CombineItemsClient( ItemBase.Cast( entity2 ) );
735 return;
736 }
737
738 if ( entity1 == null || entity2 == null ) return;
739
741
743 {
744 cmenu.Add( "#inv_context_add_as_attachment", this, "OnPerformCombination", new Param1<int>( InventoryCombinationFlags.ADD_AS_ATTACHMENT ) );
745 }
747 {
748 cmenu.Add( "#inv_context_load_chamber", this, "OnPerformCombination", new Param1<int>( InventoryCombinationFlags.LOAD_CHAMBER ) );
749 }
750
752 {
753 cmenu.Add( "#inv_context_add_as_cargo", this, "OnPerformCombination", new Param1<int>( InventoryCombinationFlags.ADD_AS_CARGO ) );
754 }
755
757 {
758 cmenu.Add( "#inv_context_swap", this, "OnPerformCombination", new Param1<int>( InventoryCombinationFlags.SWAP ) );
759 }
760
762 {
763 cmenu.Add( "#inv_context_take_to_hands", this, "OnPerformCombination", new Param1<int>( InventoryCombinationFlags.TAKE_TO_HANDS ) );
764 }
765
767 {
768 cmenu.Add( "#inv_context_combine", this, "OnPerformCombination", new Param1<int>( InventoryCombinationFlags.COMBINE_QUANTITY2 ) );
769 }
770
773 m_am_pos_x -= 5;
774 m_am_pos_y -= 5;
775
776 cmenu.Show( m_am_pos_x, m_am_pos_y );
777 }
override ContextMenu GetContextMenu()
Definition InventoryMenu.c:80
void PrintString(string s)
Helper for printing out string expression. Example: PrintString("Hello " + var);.
Definition EnScript.c:345
proto void GetMousePos(out int x, out int y)

Перекрестные ссылки InventoryCombinationFlags::ADD_AS_ATTACHMENT, InventoryCombinationFlags::ADD_AS_CARGO, InventoryCombinationFlags::COMBINE_QUANTITY2, GetContextMenu(), GetGame(), GetMousePos(), InventoryCombinationFlags::LOAD_CHAMBER, InventoryCombinationFlags::NONE, PrintString(), InventoryCombinationFlags::SWAP и InventoryCombinationFlags::TAKE_TO_HANDS.

◆ ShowAtt()

void ShowAtt ( EntityAI entity)
inlineprotected
1214 {
1217 m_Entity = entity;
1218 m_ActiveIndex = 0;
1219 if( entity.GetSlotsCountCorrect() > 0 )
1220 {
1221 m_Atts = new Attachments( this, entity );
1222 m_Atts.InitAttachmentGrid( 1 );
1223 m_AttachmentSlotsSorted = m_Atts.GetSlotsSorted();
1224 m_StaticAttCount = m_Atts.GetAttachmentHeight();
1225 m_Entity.GetOnItemAttached().Insert( AttachmentAdded );
1226 m_Entity.GetOnItemDetached().Insert( AttachmentRemoved );
1227 }
1228 else
1229 {
1230 m_StaticAttCount = 0;
1231 }
1232
1233 if( entity.GetInventory().GetCargo() )
1234 {
1235 m_CargoGrid = new CargoContainer( this, false );
1236 m_CargoGrid.SetEntity( entity );
1237 m_CargoGrid.GetRootWidget().SetSort( 1 );
1240 }
1241
1243 {
1244 foreach( int slot_id : m_AttachmentSlotsSorted )
1245 {
1246 EntityAI item = m_Entity.GetInventory().FindAttachment( slot_id );
1247 if( item )
1249 }
1250 }
1251
1252 if (m_CargoGrid)
1253 {
1254 bool hideCargo = m_Entity.GetInventory().IsInventoryLockedForLockType( HIDE_INV_FROM_SCRIPT ) || !m_Entity.CanDisplayCargo() || m_ForcedHide;
1255 if (m_CargoGrid.IsVisible() && hideCargo)
1256 {
1257 HideCargo();
1258 }
1259 else if (!m_CargoGrid.IsVisible() && !hideCargo)
1260 {
1261 ShowCargo();
1262 }
1263 }
1264
1265 m_CollapsibleHeader.ShowCollapseButtons(false);
1266 //m_CollapsibleHeader.ShowCollapseButtons( m_Atts || m_CargoGrid, m_Atts || m_CargoGrid );
1267 RecomputeOpenedContainers();
1268 Refresh();
1269 m_Parent.Refresh();
1270 }
void ShowCargo()
Definition HandsContainer.c:1580
void HideCargo()
Definition HandsContainer.c:1571
void ResetContainer()
Definition HandsContainer.c:56
int m_StaticAttCount
Definition HandsContainer.c:15
int m_StaticCargoCount
Definition HandsContainer.c:16
static proto native owned string GetSlotName(int id)
converts slot_id to string

Перекрестные ссылки AttachmentAdded(), AttachmentRemoved(), Container::CargoContainer(), InventorySlots::GetSlotName(), HideCargo(), Insert(), m_AttachmentSlotsSorted, m_Atts, m_CargoGrid, m_CollapsibleHeader, m_Entity, m_Parent, m_StaticAttCount, m_StaticCargoCount, Refresh(), ResetContainer() и ShowCargo().

◆ ShowCargo()

void ShowCargo ( )
inlineprotected
1581 {
1582 if( m_CargoGrid )
1583 {
1584 m_CargoGrid.OnShow();
1585 RecomputeOpenedContainers();
1586 }
1587 }

Перекрестные ссылки m_CargoGrid.

Используется в ShowAtt() и UpdateInterval().

◆ SplitItem()

override bool SplitItem ( )
inlineprotected
213 {
214 if (CanSplit())
215 {
216 if (m_ActiveIndex == 0)
217 {
218 ItemBase item_in_hands = ItemBase.Cast( GetGame().GetPlayer().GetHumanInventory().GetEntityInHands() );
219 if ( item_in_hands )
220 {
221 if ( item_in_hands.CanBeSplit() )
222 {
223 item_in_hands.OnRightClick();
224 }
225 }
226 }
227 else if( GetFocusedContainer() )
228 {
229 return GetFocusedContainer().SplitItem();
230 }
231 }
232 return false;
233 }

Перекрестные ссылки GetGame() и GetPlayer().

◆ TakeAsAttachment()

void TakeAsAttachment ( Widget w,
Widget receiver )
inlineprotected
1110 {
1113 int slot_id = -1;
1114
1116 receiver.GetUserData(slots_icon);
1117 if( slots_icon )
1118 {
1119 receiver_item = slots_icon.GetEntity();
1120 slot_id = slots_icon.GetSlotID();
1121 slot_owner = slots_icon.GetSlotParent();
1122 }
1123
1125 if( !item )
1126 {
1127 return;
1128 }
1129
1130 ItemBase item_base = ItemBase.Cast( item );
1131 float stack_max = item_base.GetTargetQuantityMax(slot_id);
1132
1134 if( !item.GetInventory().CanRemoveEntity() || !player.CanManipulateInventory() )
1135 return;
1136
1139 Magazine mag;
1140 if( Class.CastTo(wpn, m_Entity ) && Class.CastTo(mag, item ) )
1141 {
1142 if( player.GetWeaponManager().CanAttachMagazine( wpn, mag ) )
1143 {
1144 player.GetWeaponManager().AttachMagazine( mag );
1145 }
1146 else if(player.GetWeaponManager().CanSwapMagazine( wpn, mag ))
1147 {
1148 player.GetWeaponManager().SwapMagazine( mag );
1149 }
1150 }
1151 else if( receiver_item )
1152 {
1153 if( receiver_item != item )
1154 {
1155 if( ( ItemBase.Cast( receiver_item ) ).CanBeCombined( ItemBase.Cast( item ) ) )
1156 {
1157 ( ItemBase.Cast( receiver_item ) ).CombineItemsClient( ItemBase.Cast( item ) );
1158 }
1160 {
1161 if( !receiver_item.GetInventory().CanRemoveEntity() )
1162 return;
1163 GetGame().GetPlayer().PredictiveSwapEntities( item, receiver_item );
1164 }
1165 }
1166 }
1167 else if( slot_owner && slot_owner.GetInventory().CanAddAttachmentEx( item, slot_id ) )
1168 {
1169 if( stack_max == 0 || stack_max >= item_base.GetQuantity() )
1170 {
1171 player.PredictiveTakeEntityToTargetAttachmentEx(slot_owner, item, slot_id);
1172 }
1173 else if( stack_max != 0 && stack_max < item_base.GetQuantity() )
1174 {
1175 item_base.SplitIntoStackMaxClient( m_Entity, slot_id );
1176 }
1177 }
1178 else if( slot_owner && slot_owner.GetInventory().CanAddAttachment( item ) )
1179 {
1180 if( stack_max == 0 || stack_max >= item_base.GetQuantity() )
1181 {
1182 player.PredictiveTakeEntityToTargetAttachment(slot_owner, item);
1183 }
1184 else if( stack_max != 0 && stack_max < item_base.GetQuantity() )
1185 {
1186 item_base.SplitIntoStackMaxClient( m_Entity, -1 );
1187 }
1188 }
1189 else if( m_Entity.GetInventory().CanAddAttachment( item ) )
1190 {
1191 if( stack_max == 0 || stack_max >= item_base.GetQuantity() )
1192 {
1193 player.PredictiveTakeEntityToTargetAttachment(m_Entity, item);
1194 }
1195 else if( stack_max != 0 && stack_max < item_base.GetQuantity() )
1196 {
1197 item_base.SplitIntoStackMaxClient( m_Entity, -1 );
1198 }
1199 }
1200 else if( ( m_Entity.GetInventory().CanAddEntityInCargo( item, item.GetInventory().GetFlipCargo() ) && ( !player.GetInventory().HasEntityInInventory( item ) || !m_Entity.GetInventory().HasEntityInCargo( item )) ) || player.GetHumanInventory().HasEntityInHands( item ) )
1201 {
1203 }
1204 /*else if( !player.GetInventory().HasEntityInInventory( item ) || !m_Entity.GetInventory().HasEntityInCargo( item ) )
1205 {
1206 SplitItemUtils.TakeOrSplitToInventory( PlayerBase.Cast( GetGame().GetPlayer() ), m_Entity, item );
1207 }*/
1208
1209 ItemManager.GetInstance().HideDropzones();
1210 ItemManager.GetInstance().SetIsDragging( false );
1211 }
override void CombineItemsClient(EntityAI entity2, bool use_stack_max=true)
Definition ItemBase.c:5561

Перекрестные ссылки GameInventory::CanSwapEntitiesEx(), Class::CastTo(), CombineItemsClient(), GetGame(), ItemManager::GetInstance(), GetItemPreviewItem(), GetPlayer(), m_Entity и SplitItemUtils::TakeOrSplitToInventory().

Используется в OnDropReceivedFromHeader() и OnDropReceivedFromHeader2().

◆ TransferItem()

override bool TransferItem ( )
inlineprotected
188 {
189 if (m_ActiveIndex == 0)
190 {
191 if (CanTakeToInventory())
192 {
193 EntityAI item_in_hands = GetGame().GetPlayer().GetHumanInventory().GetEntityInHands();
194 if (item_in_hands && GetGame().GetPlayer().GetHumanInventory().CanRemoveEntityInHands() && !GetGame().GetPlayer().GetInventory().HasInventoryReservation(item_in_hands, null))
195 {
196 if (GetGame().GetPlayer().PredictiveTakeEntityToInventory( FindInventoryLocationType.CARGO, item_in_hands ))
197 {
198 m_MainWidget.FindAnyWidget("Cursor").Show( false );
199 m_MainWidget.FindAnyWidget("hands_preview_root").SetAlpha( 0.7 );
200 return true;
201 }
202 }
203 }
204 }
205 else if (GetFocusedContainer())
206 {
207 return GetFocusedContainer().TransferItem();
208 }
209 return false;
210 }

Перекрестные ссылки GetGame() и GetPlayer().

◆ TransferItemToVicinity()

override bool TransferItemToVicinity ( )
inlineprotected
353 {
354 if (CanDrop())
355 {
356 if (m_ActiveIndex == 0)
357 {
359 ItemBase item_in_hands = ItemBase.Cast(player.GetHumanInventory().GetEntityInHands());
360 if ( item_in_hands && player.CanDropEntity( item_in_hands ) && GetGame().GetPlayer().GetHumanInventory().CanRemoveEntityInHands() && !player.GetInventory().HasInventoryReservation(item_in_hands, null) )
361 {
362 if ( item_in_hands.GetTargetQuantityMax() < item_in_hands.GetQuantity() )
363 item_in_hands.SplitIntoStackMaxClient( null, -1 );
364 else
365 player.PhysicalPredictiveDropItem( item_in_hands );
366 m_MainWidget.FindAnyWidget("Cursor").Show( false );
367 m_MainWidget.FindAnyWidget("hands_preview_root").SetAlpha( 0.7 );
368 return true;
369 }
370 }
371 else if ( GetFocusedContainer() )
372 {
373 return GetFocusedContainer().TransferItemToVicinity();
374 }
375 }
376 return false;
377 }

Перекрестные ссылки GetGame() и GetPlayer().

◆ UnfocusAll()

override void UnfocusAll ( )
inlineprotected
944 {
945 UnfocusGrid();
946 }
override void UnfocusGrid()
Definition HandsContainer.c:913

Перекрестные ссылки UnfocusGrid().

◆ UnfocusGrid()

override void UnfocusGrid ( )
inlineprotected
914 {
915 if( m_Atts )
916 {
917 m_Atts.UnfocusAll();
918 }
919
920 if( m_CargoGrid )
921 {
922 m_CargoGrid.UnfocusAll();
923 }
924
926 {
928 {
929 cargo.UnfocusAll();
930
931 }
932 }
933
935 {
937 {
938 att.UnfocusAll();
939 }
940 }
941 }

Перекрестные ссылки Container::CargoContainer(), m_AttachmentAttachments, m_AttachmentCargos, m_Atts и m_CargoGrid.

Используется в UnfocusAll().

◆ UpdateInterval()

override void UpdateInterval ( )
inlineprotected
1367 {
1368 super.UpdateInterval();
1369
1370 if ( m_Entity )
1371 {
1372 if (m_CargoGrid)
1373 {
1374 bool hideCargo = m_Entity.GetInventory().IsInventoryLockedForLockType( HIDE_INV_FROM_SCRIPT ) || !m_Entity.CanDisplayCargo() || m_ForcedHide;
1375 if (m_CargoGrid.IsVisible() && hideCargo)
1376 {
1377 HideCargo();
1378 }
1379 else if (!m_CargoGrid.IsVisible() && !hideCargo)
1380 {
1381 ShowCargo();
1382 }
1383
1384 m_CargoGrid.UpdateInterval();
1385 }
1386
1387 if ( m_Atts )
1388 {
1389 m_Atts.UpdateInterval();
1390 }
1391
1392 for ( int i = 0; i < m_AttachmentCargos.Count(); i++ )
1393 {
1394 m_AttachmentCargos.GetElement( i ).UpdateInterval();
1395 }
1396 }
1397
1399 m_CollapsibleHeader.UpdateInterval();
1400 }
void ElectricityIcon()
Definition HandsContainer.c:1522

Перекрестные ссылки ElectricityIcon(), HideCargo(), m_AttachmentCargos, m_Atts, m_CargoGrid, m_CollapsibleHeader, m_Entity и ShowCargo().

Поля

◆ m_AttachmentAttachments

◆ m_AttachmentAttachmentsContainers

ref map<EntityAI, AttachmentsWrapper> m_AttachmentAttachmentsContainers
protected

◆ m_AttachmentCargos

◆ m_AttachmentSlotsSorted

ref array<int> m_AttachmentSlotsSorted
protected

Используется в AttachmentAdded() и ShowAtt().

◆ m_Atts

◆ m_CargoGrid

◆ m_CollapsibleHeader

ref HandsHeader m_CollapsibleHeader
protected

◆ m_HandsPreview

ref HandsPreview m_HandsPreview
protected

Используется в HandsContainer() и ResetContainer().

◆ m_Hidden

bool m_Hidden
protected

Используется в CollapseButtonOnMouseButtonDown().

◆ m_ScrollWidget

ScrollWidget m_ScrollWidget
protected

◆ m_StaticAttCount

int m_StaticAttCount = 0
protected

Используется в ShowAtt().

◆ m_StaticCargoCount

int m_StaticCargoCount = 0
protected

Используется в ShowAtt().


Объявления и описания членов класса находятся в файле: