22 private const string LOCK_VERSION =
"#widget_lock";
23 private const string UNLOCK_VERSION =
"#widget_unlock";
24 private string m_Name = LOCK_VERSION;
28 m_CallbackClass = ActionLockAttachmentCB;
39 if ( target_IB.IsLockedInSlot() )
41 else if ( target_IB.IsAlive() )
47 override void CreateConditionComponents()
64 if ( target_IB && parent_EAI )
72 bool isPresent = targetDoor.GetInventory().GetCurrentInventoryLocation( loc );
74 if ( !isPresent || loc.GetSlot() == -1 )
84 if ( target_IB.IsLockedInSlot() )
86 else if ( target_IB.IsAlive() )
88 else if ( !target_IB.IsLockedInSlot() )
91 targetType = target_IB.GetLockType();
93 for (
int i = 0; i < compLock.Count(); i++)
95 if ( targetType == compLock[i] && targetType !=
eLockTypes.NONE)
104 override void OnStartAnimationLoop(
ActionData action_data )
106 super.OnStartAnimationLoop( action_data );
112 GetGame().RPCSingleParam( target_IB,
ERPCs.RPC_SOUND_LOCK_ATTACH, play,
true );
122 GetGame().RPCSingleParam( target_IB,
ERPCs.RPC_SOUND_LOCK_ATTACH, play,
true );
126 override void OnEndAnimationLoop(
ActionData action_data )
128 super.OnEndAnimationLoop( action_data );
134 GetGame().RPCSingleParam( target_IB,
ERPCs.RPC_SOUND_LOCK_ATTACH, play,
true );
138 override void OnFinishProgressServer(
ActionData action_data )
142 MiscGameplayFunctions.DealAbsoluteDmg(action_data.m_MainItem, 5);
144 if (target_IB.IsLockedInSlot())
146 target_IB.UnlockFromParent();
150 target_IB.LockToParent();