-
Notifications
You must be signed in to change notification settings - Fork 229
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixes #1565 - moved the "invalid target" logic.
The problem was caused by having the "invalid target" logic at too "deep" a level of the code, such that not only was it preventing you from selecting your own ship as a your target, but it was also preventing you from EVER using your own ship in the Vessel() constructor at all. I had to move the logic that prevents invalid targets a bit higher up, getting it out of the low level constructor so it's possible to construct a Vessel() of your own ship.
- Loading branch information
Showing
4 changed files
with
27 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
using System; | ||
|
||
namespace kOS.Safe.Exceptions | ||
{ | ||
/// <summary> | ||
/// Description of KOSInvalidTargetException. | ||
/// </summary> | ||
public class KOSInvalidTargetException : KOSException | ||
{ | ||
public KOSInvalidTargetException(string msg) : base(msg) | ||
{ | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters