heatInsulation for player ships (rev 4482)

For test results, bug reports, announcements of new builds etc.

Moderators: winston, another_commander, Getafix

Post Reply
User avatar
Commander McLane
---- E L I T E ----
---- E L I T E ----
Posts: 9520
Joined: Thu Dec 14, 2006 9:08 am
Location: a Hacker Outpost in a moderately remote area
Contact:

heatInsulation for player ships (rev 4482)

Post by Commander McLane »

It seems that player.ship.heatInsulation is read-only. Any attempts to change it via the console are futile. Is this by design? It seems buggy to me.

It's definitely read/write for NPCs, as it should be.
another_commander
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 6633
Joined: Wed Feb 28, 2007 7:54 am

Re: heatInsulation for player ships (rev 4482)

Post by another_commander »

The heat insulation for player is defined in the code specifically as:

Code: Select all

- (float) heatInsulation
{
	return [self hasHeatShield] ? 2.0f : 1.0f;
}
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.
User avatar
Fatleaf
Intergalactic Spam Assassin
Intergalactic Spam Assassin
Posts: 1988
Joined: Tue Jun 08, 2010 5:11 am
Location: In analysis mode on Phaelon
Contact:

Re: heatInsulation for player ships (rev 4482)

Post by Fatleaf »

Commander McLane wrote:
It seems that player.ship.heatInsulation is read-only. Any attempts to change it via the console are futile. Is this by design? It seems buggy to me.

It's definitely read/write for NPCs, as it should be.
Thanks CM, you have just saved me a lot of time and confusion. Now to go on to something else.
Find out about the early influences of Fatleaf here. Also his OXP's!
Holds the Ooniversal record for "Thread Necromancy"
User avatar
Commander McLane
---- E L I T E ----
---- E L I T E ----
Posts: 9520
Joined: Thu Dec 14, 2006 9:08 am
Location: a Hacker Outpost in a moderately remote area
Contact:

Re: heatInsulation for player ships (rev 4482)

Post by Commander McLane »

another_commander wrote:
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.
Either one seems possible and reasonable.
another_commander
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 6633
Joined: Wed Feb 28, 2007 7:54 am

Re: heatInsulation for player ships (rev 4482)

Post by another_commander »

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.
User avatar
Eric Walch
Slightly Grand Rear Admiral
Slightly Grand Rear Admiral
Posts: 5536
Joined: Sat Jun 16, 2007 3:48 pm
Location: Netherlands

Re: heatInsulation for player ships (rev 4482)

Post by Eric Walch »

another_commander wrote:
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.
User avatar
JensAyton
Grand Admiral Emeritus
Grand Admiral Emeritus
Posts: 6657
Joined: Sat Apr 02, 2005 2:43 pm
Location: Sweden
Contact:

Re: heatInsulation for player ships (rev 4482)

Post by JensAyton »

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.)
Switeck
---- E L I T E ----
---- E L I T E ----
Posts: 2411
Joined: Mon May 31, 2010 11:11 pm

Re: heatInsulation for player ships (rev 4482)

Post by Switeck »

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.
User avatar
Commander McLane
---- E L I T E ----
---- E L I T E ----
Posts: 9520
Joined: Thu Dec 14, 2006 9:08 am
Location: a Hacker Outpost in a moderately remote area
Contact:

Re: heatInsulation for player ships (rev 4482)

Post by Commander McLane »

Note that this bug report is only about the player ship.
Switeck
---- E L I T E ----
---- E L I T E ----
Posts: 2411
Joined: Mon May 31, 2010 11:11 pm

Re: heatInsulation for player ships (rev 4482)

Post by Switeck »

I mentioned NPC heat insulation because it looked like heat insulation was going to only accept 2 values, on or off probably even for NPC ships.
User avatar
JensAyton
Grand Admiral Emeritus
Grand Admiral Emeritus
Posts: 6657
Joined: Sat Apr 02, 2005 2:43 pm
Location: Sweden
Contact:

Re: heatInsulation for player ships (rev 4482)

Post by JensAyton »

Switeck wrote:
I mentioned NPC heat insulation because it looked like heat insulation was going to only accept 2 values, on or off probably even for NPC ships.
No, I don’t think anyone’s suggesting that.
Switeck
---- E L I T E ----
---- E L I T E ----
Posts: 2411
Joined: Mon May 31, 2010 11:11 pm

Re: heatInsulation for player ships (rev 4482)

Post by Switeck »

My misunderstanding then, sorry. :oops:
Post Reply