forked from KSP-RO/TestFlight
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathTestFlightFailure_Explode.cs
37 lines (32 loc) · 1.01 KB
/
TestFlightFailure_Explode.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using UnityEngine;
using TestFlightAPI;
namespace TestFlight
{
public class TestFlightFailure_Explode : TestFlightFailureBase
{
/// <summary>
/// Triggers the failure controlled by the failure module
/// </summary>
public override void DoFailure()
{
base.DoFailure();
this.part.explode();
}
/// <summary>
/// Asks the repair module if all condtions have been met for the player to attempt repair of the failure. Here the module can verify things such as the conditions (landed, eva, splashed), parts requirements, etc
/// </summary>
/// <returns><c>true</c> if this instance can attempt repair; otherwise, <c>false</c>.</returns>
public override bool CanAttemptRepair()
{
return false;
}
public override float DoRepair()
{
return -1;
}
}
}