GRS buoyRepair.oxp
Moderators: winston, another_commander
- Cmdr James
- Commodore
- Posts: 1357
- Joined: Tue Jun 05, 2007 10:43 pm
- Location: Berlin
Yes, that does fix it. It is needed in at least 3 places
buoyrepairShip.js
buoyrepairShuttle.js
buoyrepairViper.js
Interestingly, the code is identical for this method in all three files. Is there some kind of javascript inheritance that could have been used to simplify this? (I am asking out of interest in the code,not as a criticism of the OXP )
buoyrepairShip.js
buoyrepairShuttle.js
buoyrepairViper.js
Interestingly, the code is identical for this method in all three files. Is there some kind of javascript inheritance that could have been used to simplify this? (I am asking out of interest in the code,not as a criticism of the OXP )
- JensAyton
- Grand Admiral Emeritus
- Posts: 6657
- Joined: Sat Apr 02, 2005 2:43 pm
- Location: Sweden
- Contact:
Inheritance isn’t really applicable here because scripts don’t inherit from each other. (Actually, you can change an object’s prototype at runtime, but it’s not a technique I’d recommend here.) It’s possible to make a function global (but in Oolite that’d be bad, bad, bad). It’s also possible to use the worldScripts object to call a function in another script, in exactly the same way as worldScripts.buoyRepair.grsStation is being accessed in this case, but it seems a bit over the top for such a small function.Cmdr James wrote:Interestingly, the code is identical for this method in all three files. Is there some kind of javascript inheritance that could have been used to simplify this? (I am asking out of interest in the code,not as a criticism of the OXP :) )
E-mail: [email protected]
- Eric Walch
- Slightly Grand Rear Admiral
- Posts: 5536
- Joined: Sat Jun 16, 2007 3:48 pm
- Location: Netherlands
. Maybe this suppresses the error, but does not solve the real problem. As Cmdr James writes, this error only occurs in systems that do have the station. Actually it is the station itself that add the ships to the system that use this program-line. So a test for the station's presence should not be necessary: it should be there.Yep, there should be an “if (worldScripts.buoyRepair.grsStation)” test there.
The line that gives the error is used for certain ships to find the station and head in his direction. By just placing a “if (worldScripts.buoyRepair.grsStation)” the error goes away but the ships don't find the station. I'll look deeper into it.
UPS-Courier & DeepSpacePirates & others at the box and some older versions
- JensAyton
- Grand Admiral Emeritus
- Posts: 6657
- Joined: Sat Apr 02, 2005 2:43 pm
- Location: Sweden
- Contact:
A reasonable reason for that would be that something attacked the station. :-)
E-mail: [email protected]
- Eric Walch
- Slightly Grand Rear Admiral
- Posts: 5536
- Joined: Sat Jun 16, 2007 3:48 pm
- Location: Netherlands
Yes, after sending my reply, I realised that a q-bomb can destroy the station. The test for the station should be there, in combination with an else to direct to the main station in case of failure.Ahruman wrote:A reasonable reason for that would be that something attacked the station.
UPS-Courier & DeepSpacePirates & others at the box and some older versions
- Eric Walch
- Slightly Grand Rear Admiral
- Posts: 5536
- Joined: Sat Jun 16, 2007 3:48 pm
- Location: Netherlands
-- Official announcement to the GRS shareholders. --
The board of directors issues a profit warning.
We just received conformation that the Lave flight school contracted a new head of education. His job will be to make sure pilots get a better drill in launch discipline. Lately traders often didn't bother to clear the launch area and thereby passing the navigation buoy's close. When the new head of education succeeds in teaching the students his launch procedures, new pilots will clear the stations launch area sooner with result less buoy losses.
Of cause this is bad news for our shareholders. Anticipating on this fact we already reduced buoy production by 20%.
However, we knew this day would come and with the construction of the stations we also anticipated on a following up for new ways of income. With the 20% free production capacity we already started the production of some extra large fuel and trading ships. By scaling up we will be able to reduce the freight cost per ton. Currently there are no regular system stations were those large ships can dock with, but we will use the external docking ports of out GRS stations that by now are available throughout the universe. Of cause other traders can use those ports also after paying our docking fee in advance.
-- End of announcement --
The board of directors issues a profit warning.
We just received conformation that the Lave flight school contracted a new head of education. His job will be to make sure pilots get a better drill in launch discipline. Lately traders often didn't bother to clear the launch area and thereby passing the navigation buoy's close. When the new head of education succeeds in teaching the students his launch procedures, new pilots will clear the stations launch area sooner with result less buoy losses.
Of cause this is bad news for our shareholders. Anticipating on this fact we already reduced buoy production by 20%.
However, we knew this day would come and with the construction of the stations we also anticipated on a following up for new ways of income. With the 20% free production capacity we already started the production of some extra large fuel and trading ships. By scaling up we will be able to reduce the freight cost per ton. Currently there are no regular system stations were those large ships can dock with, but we will use the external docking ports of out GRS stations that by now are available throughout the universe. Of cause other traders can use those ports also after paying our docking fee in advance.
-- End of announcement --
UPS-Courier & DeepSpacePirates & others at the box and some older versions
- pagroove
- ---- E L I T E ----
- Posts: 3035
- Joined: Wed Feb 21, 2007 11:52 pm
- Location: On a famous planet
OMG it's coming a new Oolite dream is coming true
For P.A. Groove's music check
https://soundcloud.com/p-a-groove
Famous Planets v 2.7. (for Povray)
https://bb.oolite.space/viewtopic.php?f=4&t=13709
https://soundcloud.com/p-a-groove
Famous Planets v 2.7. (for Povray)
https://bb.oolite.space/viewtopic.php?f=4&t=13709
- Eric Walch
- Slightly Grand Rear Admiral
- Posts: 5536
- Joined: Sat Jun 16, 2007 3:48 pm
- Location: Netherlands
That dream could explode when you realise why you had to pay your docking fee in advance.pagroove wrote:OMG it's coming a new Oolite dream is coming true
UPS-Courier & DeepSpacePirates & others at the box and some older versions
- pagroove
- ---- E L I T E ----
- Posts: 3035
- Joined: Wed Feb 21, 2007 11:52 pm
- Location: On a famous planet
For P.A. Groove's music check
https://soundcloud.com/p-a-groove
Famous Planets v 2.7. (for Povray)
https://bb.oolite.space/viewtopic.php?f=4&t=13709
https://soundcloud.com/p-a-groove
Famous Planets v 2.7. (for Povray)
https://bb.oolite.space/viewtopic.php?f=4&t=13709
- DaddyHoggy
- Intergalactic Spam Assassin
- Posts: 8515
- Joined: Tue Dec 05, 2006 9:43 pm
- Location: Newbury, UK
- Contact:
Don't care about paying as long as I can save when I get there!
Bring it on!
Bring it on!
Oolite Life is now revealed hereSelezen wrote:Apparently I was having a DaddyHoggy moment.
- pagroove
- ---- E L I T E ----
- Posts: 3035
- Joined: Wed Feb 21, 2007 11:52 pm
- Location: On a famous planet
It's very quiet.....before the storm?
For P.A. Groove's music check
https://soundcloud.com/p-a-groove
Famous Planets v 2.7. (for Povray)
https://bb.oolite.space/viewtopic.php?f=4&t=13709
https://soundcloud.com/p-a-groove
Famous Planets v 2.7. (for Povray)
https://bb.oolite.space/viewtopic.php?f=4&t=13709
- Eric Walch
- Slightly Grand Rear Admiral
- Posts: 5536
- Joined: Sat Jun 16, 2007 3:48 pm
- Location: Netherlands
But behind the doors we are busy communicating with all our GRS station controllers. With the expected increase in commodity trade by our bulk carriers we expect that one major distribution route from our GRS stations way will be towards the local main station.pagroove wrote:It's very quiet.....before the storm?
Therefor we ordered the controllers to slowly turn the stations around their axis so the docking bay points towards the main-station in future for faster approach. This turning will happen slowly and probably will take a few days till completion.
By this message we already warn pilots that are used to use their last downloaded approach trajectory, to always request new docking coordinates for their approach. Don't rely on them being the same for the next days! And when having a bad communication channel, you can always head towards the GRS nav-beacon first before docking.
UPS-Courier & DeepSpacePirates & others at the box and some older versions
- pagroove
- ---- E L I T E ----
- Posts: 3035
- Joined: Wed Feb 21, 2007 11:52 pm
- Location: On a famous planet
Wonder if someone can take a spy shot of that!
For P.A. Groove's music check
https://soundcloud.com/p-a-groove
Famous Planets v 2.7. (for Povray)
https://bb.oolite.space/viewtopic.php?f=4&t=13709
https://soundcloud.com/p-a-groove
Famous Planets v 2.7. (for Povray)
https://bb.oolite.space/viewtopic.php?f=4&t=13709
- Eric Walch
- Slightly Grand Rear Admiral
- Posts: 5536
- Joined: Sat Jun 16, 2007 3:48 pm
- Location: Netherlands
GRS just got conformation that their station at Vetitice in galaxy 1 finished their station turning. :
Vetitice main station with in the background a large boa docking on the right side of the GRS station.
Close up of a large Boa docking external while a regular anaconda is just launching from the station.
Vetitice main station with in the background a large boa docking on the right side of the GRS station.
Close up of a large Boa docking external while a regular anaconda is just launching from the station.
Last edited by Eric Walch on Wed Sep 17, 2008 10:24 am, edited 1 time in total.
UPS-Courier & DeepSpacePirates & others at the box and some older versions
- DaddyHoggy
- Intergalactic Spam Assassin
- Posts: 8515
- Joined: Tue Dec 05, 2006 9:43 pm
- Location: Newbury, UK
- Contact:
Go Eric, Go Eric, Go Eric
Oolite Life is now revealed hereSelezen wrote:Apparently I was having a DaddyHoggy moment.