Page MenuHomeFeedback Tracker

class ActionFillBottleBaseCB create extra actioncomponent - CAContinuousFill
Assigned, NormalPublic

Description

Now:

class ActionFillBottleBaseCB : ActionContinuousBaseCB
{
	private int m_liquid_type;
	
	override void CreateActionComponent()
	{
		m_liquid_type = ActionFillBottleBase.Cast( m_ActionData.m_Action ).GetLiquidType( m_ActionData.m_Player, m_ActionData.m_Target, m_ActionData.m_MainItem );
		
		
		m_ActionData.m_ActionComponent = new CAContinuousFill(UAQuantityConsumed.FILL_LIQUID, m_liquid_type);
		
		//first implementation for obtaining the fuel from the feed faster
		//TODO:: make some proper get method, maybe param in config?
		if ( m_ActionData.m_Target.GetObject() && m_ActionData.m_Target.GetObject().GetType() == "Land_FuelStation_Feed")
		{
			m_ActionData.m_ActionComponent = new CAContinuousFill(UAQuantityConsumed.FUEL, m_liquid_type);
		}
	}
};

You can see that action new called twice when we tried to fill Canister

We need add else statement

if ( m_ActionData.m_Target.GetObject() && m_ActionData.m_Target.GetObject().GetType() == "Land_FuelStation_Feed")
{
  m_ActionData.m_ActionComponent = new CAContinuousFill(UAQuantityConsumed.FUEL, m_liquid_type);
}
else
{
  m_ActionData.m_ActionComponent = new CAContinuousFill(UAQuantityConsumed.FILL_LIQUID, m_liquid_type);
}

Details

Severity
Minor
Resolution
Open
Reproducibility
Sometimes
Operating System
Windows 10 x64
Category
Scripting

Event Timeline

Geez changed the task status from New to Assigned.May 3 2022, 3:28 PM