linuxgurugamer / FTLDriveContinued

Other
4 stars 4 forks source link

Implement slightly randomized jump to avoid colliding with other craft; set NaN power to 1. #32

Closed unquietwiki closed 1 year ago

unquietwiki commented 1 year ago

Primary fix: "Rendevous" sets a slightly random exit point, to avoid colliding with a vehicle that might already be at the exit point.

Secondary fixes: housekeeping; set the NaN power to 1, to avoid antimatter failure or other mod issues.

linuxgurugamer commented 1 year ago

Thanks.

A couple of comments:

  1. Please don't touch the .version file when you do a PR. You really have no idea what else is going on. Especially don't change URLs in there. If you have a problem with the version file, contact the author and talk about it

  2. Just an FYI, the Assemblyversion.cs, is an auto-generated file by my build process.

  3. NEVER, under any conditions, ever change the csproj or the sln file except to add new files. By doing that, you can totally destroy my (or anyones) local system. The best thing to do, would be to create your own .csproj file copied from the original, and make your changes there. That way any change you do in your project file won't affect anyone else

Now, a question:

Why did you change the code in the FTLDriveModule.cs from doing a "new Vessel()" to doing an "gameObject.AddComponent();" ?

This will always add a new vessel component , and never removes it. If you had at least put in a Destroy(), it might have made sense.

The other thing is that those objects are being used for local calculations, and aren't needed outside that method. The "new" will automatically free those objects when they are no longer needed.

So, what I've done is manually add in the two changes you were specific about, the NaN issue and the randomized exit.

Thank you for the PR, sorry I couldn't accept it as is. However, you will be getting the credit for these two fixes in the changelog

LGG

unquietwiki commented 1 year ago

@linuxgurugamer thanks for adding the fixes, PR or no, that was really my intention here.

  1. Sorry about that. The website didn't seem like it was working anymore, even for API stuff.
  2. Not sure how that got changed; I do remember changing the compatible game version to the latest, but thought that was in a different file. Related, I noticed the build process was trying to compile to a D-drive location, and also creating a byproduct of some binary file in the source directory.
  3. I think that change was to deal with a compilation bug in regards to NuGet packages; the ones that were there a year ago didn't appear to be installing properly. Clearing out bin & obj got rid of any other issues.
  4. The Microsoft Unity analyzer had suggested the gameObject.AddComponent() change; the only change it recommended. You're right I should've thought about Destroy, though it does seem like I didn't create duplicate copies of the craft in the process.