5class BotTestSwapInternal : BotStateBase
10 void BotTestSwapInternal (
Bot bot = NULL, BotStateBase parent = NULL)
18 m_Entity1 = j.GetInventory().CreateEntityInCargo(
"Rag");
20 m_Entity2 = s.GetInventory().CreateEntityInCargo(
"Roadflare");
27 if (m_Entity1 && m_Entity2)
29 if (m_Owner.GetInventory().CanSwapEntitiesEx(m_Entity1, m_Entity2))
31 botDebugPrint(
"[bot] + " + m_Owner +
" -> swap item=" + m_Entity1 +
" bot=" + m_Owner);
32 m_Owner.PredictiveSwapEntities(m_Entity1, m_Entity2);
34 else if (m_Owner.GetInventory().CanSwapEntitiesEx(m_Entity2, m_Entity1))
36 botDebugPrint(
"[bot] + " + m_Owner +
" <- swap item=" + m_Entity2 +
" bot=" + m_Owner);
37 m_Owner.PredictiveSwapEntities(m_Entity2, m_Entity1);
44class BotTestSwapInternalC2H : BotStateBase
49 void BotTestSwapInternalC2H (
Bot bot = NULL, BotStateBase parent = NULL)
55 EntityAI j = m_Owner.GetInventory().CreateAttachment(
"Jeans_Blue");
56 m_Entity1 = j.GetInventory().CreateEntityInCargo(
"Rag");
57 EntityAI s = m_Owner.GetInventory().CreateInInventory(
"TacticalShirt_Grey");
58 m_Entity2 = s.GetInventory().CreateEntityInCargo(
"Roadflare");
66 if (m_Entity1 && m_Entity2)
68 if (m_Owner.GetInventory().CanSwapEntitiesEx(m_Entity1, m_Entity2))
70 botDebugPrint(
"[bot] + " + m_Owner +
" -> swap item=" + m_Entity1 +
" bot=" + m_Owner);
71 m_Owner.PredictiveSwapEntities(m_Entity1, m_Entity2);
73 else if (m_Owner.GetInventory().CanSwapEntitiesEx(m_Entity2, m_Entity1))
75 botDebugPrint(
"[bot] + " + m_Owner +
" <- swap item=" + m_Entity2 +
" bot=" + m_Owner);
76 m_Owner.PredictiveSwapEntities(m_Entity2, m_Entity1);
83class BotTestSwapG2H : BotStateBase
88 void BotTestSwapG2H (
Bot bot = NULL, BotStateBase parent = NULL)
94 EntityAI j = m_Owner.GetInventory().CreateAttachment(
"Jeans_Blue");
95 m_Entity1 = j.GetInventory().CreateEntityInCargo(
"Rag");
96 EntityAI s = m_Owner.GetInventory().CreateInInventory(
"TacticalShirt_Grey");
97 m_Entity2 = s.GetInventory().CreateEntityInCargo(
"Roadflare");