3 override void CreateActionComponent()
11 protected int m_ActionState;
13 protected const int EMPTY = 0;
14 protected const int FILLED = 1;
25 override void CreateConditionComponents()
34 HescoBox hesco = HescoBox.Cast(target.GetObject());
36 if( hesco.GetState() == HescoBox.UNFOLDED )
48 if ( player.IsPlacingLocal() )
52 if (
Class.CastTo(hesco,target.GetObject()) )
54 if ( hesco.CanBeFilledAtPosition( player.GetPosition() ) )
56 if ( hesco.GetState() == HescoBox.UNFOLDED )
58 m_ActionState =
EMPTY;
61 else if( hesco.GetState() == HescoBox.FILLED)
63 m_ActionState = FILLED;
72 override void OnFinishProgressServer(
ActionData action_data )
76 if (
Class.CastTo(hesco,action_data.m_Target.GetObject()) )
78 const float ITEM_DAMAGE = 0.05;
79 action_data.m_MainItem.DecreaseHealth (
"",
"", action_data.m_Player.GetSoftSkillsManager().SubtractSpecialtyBonus( ITEM_DAMAGE,
this.GetSpecialtyWeight() )*100 );
81 if ( hesco.GetState() == HescoBox.UNFOLDED )
85 else if ( hesco.GetState() == HescoBox.FILLED )
94 override void OnFinishProgressClient(
ActionData action_data )
98 if (
Class.CastTo(hesco,action_data.m_Target.GetObject()) )
100 if ( hesco.GetState() == HescoBox.UNFOLDED )
104 else if ( hesco.GetState() == HescoBox.FILLED )