Recent Posts

Pages: [1] 2 3 ... 10
1
Huh. It may be that C# works differently than I expected, but the docs don’t indicate that the OrderBy method modifies the underlying list.

It's not the OrderBy, it is the Except that precedes it.

The documentation for Except doesn’t say that it modifies the list either. It is my understanding that none of the Enumerable methods modify the underlying data.

I don't want to turn this thread into a programming debate, which is one of the reasons that I rarely post code ;)

Are you suggesting that instead of a new list, I use the LINQ without assigning to a new list as the target in the foreach loop?

If so, I prefer to avoid that. It's harder to read and harder to debug and those are more important to me than straight performance.

If not, maybe DM me with an example of the code as you would write it.
2
General Discussion / Re: Questions Not Worth Their Own Thread: C# Edition
« Last post by Caesar on Yesterday at 03:59:02 PM »
Hi! It's been a while since I played, but I'm getting back into the game again. I wanted to read up on the mechanics, when I noticed the wiki doesn't work. I think I read that it may be a temporary issue but I couldn't find a good post on it. Does anyone have a clearer idea what's going on with the wiki?

Thanks in advance!
3
Spoilers / Re: Chance of recovering tech
« Last post by Droll on Yesterday at 03:31:12 PM »

What is the chance of recovering compressed fuel tech from ruins and what installation is it linked to? I'm assuming you can still do so as I haven't had this many ruins in a long time - I'm playing a ruin rich game at the moment and have recovered thousands of installations but have yet to uncover any tech from recovering them.


Welchbloke

Each installation type has a specific chance of also giving tech of an appropriate type. For example, if you recover a mine, there is a 1 in 300 chance of improving mining tech. The exception is research labs, which have a 1 in 5 chance of returning a random tech. However, this is limited to the tech level of the ruin race. So if you have manage to roll for the mining tech for example and you already have equal to or better tech than the ruin race, you won't get anything.

So in the context of the original question - Would recovering a fuel refinery have a small chance of recovering compressed fuel tech?

Fuel production tech. I don't think compressed is still in the game.

The tech and components are still in the db as ruins only techs and I remember organically getting the tech years ago. There's also some stuff still in there for the "advanced" variants of weapons.
4
General Discussion / Re: Questions Not Worth Their Own Thread: C# Edition
« Last post by db48x on Yesterday at 12:32:37 PM »
Huh. It may be that C# works differently than I expected, but the docs don’t indicate that the OrderBy method modifies the underlying list.

It's not the OrderBy, it is the Except that precedes it.

The documentation for Except doesn’t say that it modifies the list either. It is my understanding that none of the Enumerable methods modify the underlying data.
5
C# Suggestions / Re: Suggestions Thread for v2.4.0
« Last post by Steve Walmsley on Yesterday at 09:36:44 AM »
On the Movement Orders tab of the Naval Organization window, the "Delete Template" button and the "Delete" (fleet) button are right next to each other.
This positioning, despite the subsequent confirmation dialog, leads to me occasionally deleting a fleet when I intend to delete a template.

I think mistakes would be less likely if the second button were labeled "Delete Fleet."

That button is used to delete whatever you have selected - Fleet, Ship, Squadron, Naval Admin Command, Sub-fleet or Shipping Line. I probably should modify the button label though when you click on different things.
6
How can I calculate Aphelion and Perihelion from the values in FCT_SystemBody?

                    sb.Perihelion = sb.OrbitalDistance * (1 - sb.Eccentricity);
                    sb.Aphelion = sb.OrbitalDistance * (1 + sb.Eccentricity);
                    sb.SemiMinorAxis = sb.OrbitalDistance * Math.Sqrt(1 - (sb.Eccentricity * sb.Eccentricity));
7
General Discussion / Re: Questions Not Worth Their Own Thread: C# Edition
« Last post by skoormit on Yesterday at 09:12:22 AM »
How can I calculate Aphelion and Perihelion from the values in FCT_SystemBody?
8
Huh. It may be that C# works differently than I expected, but the docs don’t indicate that the OrderBy method modifies the underlying list.

It's not the OrderBy, it is the Except that precedes it.
9
Spoilers / Re: Chance of recovering tech
« Last post by Steve Walmsley on Yesterday at 09:04:05 AM »

What is the chance of recovering compressed fuel tech from ruins and what installation is it linked to? I'm assuming you can still do so as I haven't had this many ruins in a long time - I'm playing a ruin rich game at the moment and have recovered thousands of installations but have yet to uncover any tech from recovering them.


Welchbloke

Each installation type has a specific chance of also giving tech of an appropriate type. For example, if you recover a mine, there is a 1 in 300 chance of improving mining tech. The exception is research labs, which have a 1 in 5 chance of returning a random tech. However, this is limited to the tech level of the ruin race. So if you have manage to roll for the mining tech for example and you already have equal to or better tech than the ruin race, you won't get anything.

So in the context of the original question - Would recovering a fuel refinery have a small chance of recovering compressed fuel tech?

Fuel production tech. I don't think compressed is still in the game.
10
C# Suggestions / Re: Suggestions Thread for v2.4.0
« Last post by skoormit on Yesterday at 05:06:45 AM »
On the Movement Orders tab of the Naval Organization window, the "Delete Template" button and the "Delete" (fleet) button are right next to each other.
This positioning, despite the subsequent confirmation dialog, leads to me occasionally deleting a fleet when I intend to delete a template.

I think mistakes would be less likely if the second button were labeled "Delete Fleet."
Pages: [1] 2 3 ... 10
SMF spam blocked by CleanTalk