66 if (
m_player.GetActionManager().GetRunningAction() )
81 if ( item1 != item_in_hands && item2 != item_in_hands )
86 item1.GetInventory().GetCurrentInventoryLocation(il1);
87 item2.GetInventory().GetCurrentInventoryLocation(il2);
89 Error(
"Crafting manager - both of items are out of hands - item1: " + il1.
DumpToString() +
" item2: " + il2.
DumpToString() +
" / item in hands: - " + item_in_hands);
105 if (recipeCount == 0)
132 for (
int i = 0; i < recipeCount; i++ )
134 if (recipeID == -1 ||
m_recipes.Get(i) == recipeID)
138 Param craftParam =
new Param3<int, ItemBase, ItemBase>(
m_recipes.Get(i), item1, item2);
139 m_player.RPCSingleParam(
ERPCs.RPC_CRAFTING_INVENTORY_INSTANT, craftParam,
true,
m_player.GetIdentity());
void SetInventoryAction(ActionBase action_name, ItemBase target_item, ItemBase main_item)
static ActionVariantManager GetVariantManager(typename actionName)
void SetActionVariantCount(int count)
ScriptInvoker GetOnUpdateInvoker()
Client only - manage set up crafting on client.
void ResetInventoryCraft()
bool SetInventoryCraft(int recipeID, ItemBase item1, ItemBase item2)
void OnUpdate(Object item, Object target, int component_index)
int GetRecipeID(int action_index)
void CraftingManager(PlayerBase player, PluginRecipesManager recipesManager)
ActionVariantManager m_actionVariantManager
bool IsEnableDebugCrafting()
ref array< int > m_recipes
const int CM_MODE_INVENTORY
void SetRecipeID(int recipeID)
PluginRecipesManager m_recipesManager
Base Param Class with no parameters. Used as general purpose parameter overloaded with Param1 to Para...
proto native void Clear()
remove all calls from list
proto bool Insert(func fn, int flags=EScriptInvokerInsertFlags.IMMEDIATE)
insert method to list
Result for an object found in CGame.IsBoxCollidingGeometryProxy.
void Error(string err)
Messagebox with error message.