This PR extends upon #10 (which was accidentally closed as I messed up my support-cameras branch and rebuilt it) with the following changes:
Fixed tab/spaces issue in Scripting.cpp
Replaced negated event with the actual event being fired for the cameras destroyed event
Removed target from list of witnesses when eliminated
Side note: I removed the .Contains check in the if statement as it is unnecessary as far as I can tell. If you call .Remove() with an element that is not in the Set, C# will simply return false; no exception is thrown. Ergo, I placed both the witness removal and spotter removal in the same if statement. If you want this to be reverted back to include the .Contains check, just let me know 😃
This PR extends upon #10 (which was accidentally closed as I messed up my
support-cameras
branch and rebuilt it) with the following changes:Scripting.cpp
.Contains
check in theif
statement as it is unnecessary as far as I can tell. If you call.Remove()
with an element that is not in theSet
, C# will simply returnfalse
; no exception is thrown. Ergo, I placed both the witness removal and spotter removal in the sameif
statement. If you want this to be reverted back to include the.Contains
check, just let me know 😃The specific commits added in this PR (compared to #10) are https://github.com/OrfeasZ/Statman/commit/1cc0cbde9444ff3cd83902ecd93f624762e89116 and https://github.com/OrfeasZ/Statman/commit/4bf201fb7d17e726f9a0ba7eec5c4c28b641da51