3 override void CreateActionComponent()
11 static int CYCLES = 5;
19 m_Text =
"#destroy_combination_lock";
22 override void CreateConditionComponents()
30 Object target_object = target.GetObject();
31 string selection = target_object.GetActionComponentName( target.GetComponentIndex() );
32 Fence fence = Fence.Cast( target_object );
34 if ( fence && fence.IsLocked() && selection ==
"wall_interact" )
42 override void OnFinishProgressServer(
ActionData action_data )
44 Fence fence = Fence.Cast( action_data.m_Target.GetObject() );
48 if ( combination_lock )
50 combination_lock.AddHealth(
"",
"",-(combination_lock.GetMaxHealth(
"",
"")/CYCLES));
52 if ( combination_lock.IsDamageDestroyed() )
54 combination_lock.UnlockServer( action_data.m_Player, fence );
60 action_data.m_MainItem.DecreaseHealth(
UADamageApplied.SAW_LOCK,
false );
66 override string GetAdminLogMessage(
ActionData action_data)
68 return " destroyed combination lock with " + action_data.m_MainItem.GetDisplayName();