linuxgurugamer / FTLDriveContinued

Other
4 stars 4 forks source link

Basic code fixes #9

Closed arekbulski closed 6 years ago

arekbulski commented 6 years ago

I did not really change anything from user's perspective, those are only C# related issues. And I havent gotten to overhaul yet, this is only the obvious things that cried for fixing. Since I am not setup yet, no VisualStudio yet, all was done in NOTEPAD so if I broke the syntax and doesnt compile, no worries, I will have it compiled soon.

I advise checking it ONE COMMIT at a time, makes it easier. First commit can be skipped, its only whitespace.

Achievements: TotalForce() 15 lines into one-liner, several other one-liners, 2 bugs :smile:

linuxgurugamer commented 6 years ago

Oh. I'm going to move it into a branch so I can merge and compile it in a test mod.

Also, I had been (eventually) planning on replacing the "foreach" with (for in ti = 0 i < xxx.Count; i++) for efficiency. I'm not sure if the Sum() is just as efficient, I'm going to have to research it, but I believe it might have the same problem as the foreach.

The changes look ok, but I'm going to have to compile and test them before merging into the main branch

I won't get to this until tomorrow, so if you get your VS done in time, let me know, othereise I'll merge into a branch and test that

linuxgurugamer commented 6 years ago

Next time, please wait until you've had a chance to compile it yourself.

Also, when making changes, please keep in mind that some language syntaxes may not be as efficient as some less-obvious syntaxes, such as the foreach ->for (int i.....

arekbulski commented 6 years ago

Suggestion: should we make Beacon consume EC? Broadcasing position via RF surely takes power.

linuxgurugamer commented 6 years ago

Two ways of looking at it. One is that it is just there, a passive object, the other is an active object.

Let me think on it.

arekbulski commented 6 years ago

Confirming that it compiles on KSP 1.3.1. Please have it merged. Next patch: frontend overhaul

linuxgurugamer commented 6 years ago

I've created a dev branch, please update your repo to use that as your development. I'm merging this and all future changes into that branch