14 PrintFormat(
"ScenarioFramework: The item %1 could not be inserted into %2! Check name of the entity and be sure the entity has a space in the inventory",
m_sNameItem,
m_sNameMaster, LogLevel.ERROR);
26 [
Attribute(defvalue:
"",
desc:
"Name of the entity whose inventory to be filled with")];
27 protected string m_sIDMaster;
30 override void Init(
SCR_ScenarioFrameworkArea area =
null, SCR_ScenarioFrameworkEActivationType activation = SCR_ScenarioFrameworkEActivationType.SAME_AS_PARENT)
39 if (!activationCondition.Init(
GetOwner()))
46 super.Init(area, activation);
48 IEntity master =
GetGame().GetWorld().FindEntityByName(m_sIDMaster);
53 if (!inventoryComponent)
57 SCR_InvCallBackCheck pInvCallback =
new SCR_InvCallBackCheck();
58 pInvCallback.m_sNameMaster = m_sIDMaster;
61 item =
object.GetSpawnedEntity();
62 if (!item || item == master)
65 pInvCallback.m_sNameItem = item.GetName();
67 inventoryComponent.TryInsertItem(item,
EStoragePurpose.PURPOSE_ANY, pInvCallback);