In my sunbase mission I used heat_insulation on some ships. It didn't work in version 1.65 so I thought is was a version 1.69 thing. There it also not worked. Looking at the 1.65 code the heat_insulation thing was there already.
Default heat_insulation is 1 but if I set it at 20 the NPC ships get overheated at exactly the same location. (I tried to set it at 20 as number as well as string in the shiplist). But looking at the sourcecode and how oolite calculates the NPC ship-temperatures it should work. The only thing I can come up with is that the value of "heat_insulation" stays the same. Looking at the part were it is read in, it says:
// ship skin insulation factor (1.0 is normal)
heat_insulation = 1.0;
if ([shipdict objectForKey:@"heat_insulation"])
heat_insulation = [[shipdict objectForKey:@"heat_insulation"] doubleValue];
I am only a novice in C but looking at how the other values are read in, must it not be:
heat_insulation = [(NSNumber *)[shipdict objectForKey:@"heat_insulation"] doubleValue];
heat_insulation
Moderators: winston, another_commander, Getafix
- Eric Walch
- Slightly Grand Rear Admiral
- Posts: 5536
- Joined: Sat Jun 16, 2007 3:48 pm
- Location: Netherlands
- JensAyton
- Grand Admiral Emeritus
- Posts: 6657
- Joined: Sat Apr 02, 2005 2:43 pm
- Location: Sweden
- Contact:
No, the cast has no effect (unless a warning is generated about the type signature of the method being unknown, which would not happen in this case). However, in the current source it ought to be [shipdict floatForKey:@"heat_insulation"], which is more type-safe.
E-mail: [email protected]