3 override void CreateActionComponent()
18 m_Text =
"#collect_persons_blood";
21 override void CreateConditionComponents()
27 override void OnEndServer(
ActionData action_data )
34 Param1<float> nacdata;
35 Class.CastTo( nacdata, action_data.m_ActionComponent.GetACData() );
38 delta = ( nacdata.param1 /
UATimeSpent.COLLECT_BLOOD );
43 action_data.m_Player.ServerReplaceItemInHandsWithNew(lambda);
51 float m_SpecialtyWeight;
52 float m_percentFilled;
57 override void CopyOldPropertiesToNew(notnull
EntityAI old_item,
EntityAI new_item)
61 super.CopyOldPropertiesToNew(old_item, new_item);
69 MiscGameplayFunctions.TransferItemProperties( old_item_IB, new_item_IB,
true,
false,
true );
70 ItemBase.Cast( new_item ).SetLiquidType(
m_Target.GetStatBloodType().Get() );
73 maxQuantity =
ItemBase.Cast( new_item ).GetQuantityMax();
74 quantitySet = m_percentFilled * maxQuantity;
75 ItemBase.Cast( new_item ).SetQuantity( quantitySet );
76 m_Target.AddHealth(
"",
"Blood", -quantitySet );
78 if (
m_Player.HasBloodTypeVisible() )
80 PluginTransmissionAgents plugin = PluginTransmissionAgents.Cast(
GetPlugin(PluginTransmissionAgents));
85 Debug.LogError(
"ActionCollectBloodTargetLambda: failed to create new item",
"static");