6 m_AdjustedTimeToComplete = 1000;
9 m_SpentUnits =
new Param1<float>(0);
13 m_SpentUnits.param1 = 0;
16 WorldCraftActionData action_data_wc = WorldCraftActionData.Cast(action_data);
18 PluginRecipesManager module_recipes_manager;
19 Class.CastTo(module_recipes_manager,
GetPlugin(PluginRecipesManager));
20 if( module_recipes_manager )
22 m_AdjustedTimeToComplete = module_recipes_manager.GetRecipeLengthInSecs( action_data_wc.m_RecipeID );
23 if( module_recipes_manager.GetIsInstaRecipe( action_data_wc.m_RecipeID) || module_recipes_manager.IsEnableDebugCrafting() )
25 m_AdjustedTimeToComplete = 0;
27 float specialty_weight = module_recipes_manager.GetRecipeSpecialty( action_data_wc.m_RecipeID );
28 m_AdjustedTimeToComplete = action_data.m_Player.GetSoftSkillsManager().AdjustCraftingTime( m_AdjustedTimeToComplete, specialty_weight );
36 if ( !action_data.m_Player )
41 if ( m_TimeElpased < m_AdjustedTimeToComplete )
43 m_TimeElpased += action_data.m_Player.GetDeltaT();
49 m_SpentUnits.param1 = m_TimeElpased;
50 SetACData(m_SpentUnits);
52 OnCompletePogress(action_data);
58 override float GetProgress()
60 if( m_AdjustedTimeToComplete > 0 )
63 return m_TimeElpased/m_AdjustedTimeToComplete;