Status of shields, energy and laser temp after a jump
Moderators: winston, another_commander
- Amah
- ---- E L I T E ----
- Posts: 486
- Joined: Tue Aug 28, 2012 8:05 pm
- Location: aboard the Laenina Crowne - Yasen-N class space freighter
- Contact:
Re: Status of shields, energy and laser temp after a jump
thanks for the hints, folks.
Amah
- about Amah: wiki
- noshaders versions of Griff's extra, alternate ships and accessories: discussion, wiki
- ocpc - customize the player ship: discussion, oxp repository
- Commander McLane
- ---- 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: Status of shields, energy and laser temp after a jump
A follow-up question to my last post: I was actually astonished to discover that
I also was astonished to discover that
A little odd, I thought.
energy
and maxEnergy
are properties of Entity
rather than Ship
. Do non-ship entities, like sun and planets, actually use their energy
for anything?I also was astonished to discover that
Code: Select all
> S.sun.energy
1000000
> S.sun.maxEnergy
0
> S.mainPlanet.energy
1000000
> S.mainPlanet.maxEnergy
0
Re: Status of shields, energy and laser temp after a jump
Suns and planets, no, not really. Quirium cascades and plasma turret shots do use the energy value, though, and are not ships, so that's why it's on Entity internally, and thus on that part of the JS representation.
- Wildeblood
- ---- E L I T E ----
- Posts: 2453
- Joined: Sat Jun 11, 2011 6:07 am
- Location: Western Australia
- Contact:
Re: Status of shields, energy and laser temp after a jump
And unkind people say you don't have a sense of humour, Commander McLane. You're just too subtle for them.Commander McLane wrote:Instead of just wondering by yourself you could get absolute certainty by simply looking it up. Everything about Oolite scripting is well documented and just one click away, in the Oolite JavaScript Reference of the Elite Wiki.
- Eric Walch
- Slightly Grand Rear Admiral
- Posts: 5536
- Joined: Sat Jun 16, 2007 3:48 pm
- Location: Netherlands
Re: Status of shields, energy and laser temp after a jump
I don't think that planets use energy anywhere in the code but they have a value set on initialisation:Commander McLane wrote:Do non-ship entities, like sun and planets, actually use theirenergy
for anything?
Code: Select all
energy = collision_radius * 1000.0;
UPS-Courier & DeepSpacePirates & others at the box and some older versions
Re: Status of shields, energy and laser temp after a jump
I'd go with either returning null or NaN, myself!
Hey, free OXPs: farsun v1.05 & tty v0.5! :0)