Meaning, that it is meant to be either 1 or 2, depending on the existence of heat shielding. I would guess at this point that the behaviour is intended. However, at the same time, this has the characteristics of a bug. The JS code actually works for player and does change the value, but the next query for the actual value will return either 1 or 2. I think that we should either remove the above code from the player entity and grant proper read/write access to JS or explicitly state to JS that this property is read-only for the player, like we do for thrust.
I think that we should either remove the above code from the player entity and grant proper read/write access to JS or explicitly state to JS that this property is read-only for the player, like we do for thrust.
I commited the explict set to read-only for player in r4483. I thought it would be preferred, because removing the code shown earlier could possibly conflict with the way heat shielding for the player is handled.
I commited the explict set to read-only for player in r4483. I thought it would be preferred, because removing the code shown earlier could possibly conflict with the way heat shielding for the player is handled.
I thought is was always documented as a npc only feature. However, looking at the wiki, that was only documented that way for the heat_insulation in shipData.plist and not for the JS property heatInsulation, that behaves essentially the same.
Making this more flexible and working out how to deal with heat shield equipment is definitely outside the scope of beta fixes.
For 2.0, I want to make the property read-write for all and implement EQ_HEAT_SHIELD in terms of it, probably simply by adding 1 when awarded and subtracting 1 when removed. (As a general thing, I want to implement as much as possible of the built-in equipment in scripting terms, without having to differentiate between player and NPC ships where at all possible. I’ve been thinking about this recently as I’ve been refactoring shipdata.plist parsing, which connects to all the special cases for equipment.)
Heat Insulation needs to be ridiculously high for NPCs because they're often rather slow hanging around close to the sun. I was told by Eric that in his testing he needed to set it heatInsulation to 6 or 7 to keep NPC ships alive. (My similar tests were generally inconclusive because my own ship often got cooked while watching the NPC ship nearer to the sun.) NPC Sun Skimmers will no doubt need something better than bare minimum to keep them alive.