Page 5 of 16
Posted: Sun Aug 03, 2008 9:05 am
by Cmdr James
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
)
Posted: Sun Aug 03, 2008 11:44 am
by JensAyton
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 :) )
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.
Posted: Mon Aug 04, 2008 7:42 am
by Eric Walch
Yep, there should be an “if (worldScripts.buoyRepair.grsStation)” test there.
. 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.
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.
Posted: Mon Aug 04, 2008 8:32 am
by JensAyton
A reasonable reason for that would be that something attacked the station. :-)
Posted: Mon Aug 04, 2008 11:18 am
by Eric Walch
Ahruman wrote:A reasonable reason for that would be that something attacked the station.
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.
Posted: Sun Sep 14, 2008 7:31 pm
by Eric Walch
-- 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 --
Posted: Sun Sep 14, 2008 8:15 pm
by pagroove
OMG it's coming a new Oolite dream is coming true
Posted: Sun Sep 14, 2008 8:24 pm
by Eric Walch
pagroove wrote:OMG it's coming a new Oolite dream is coming true
That dream could explode when you realise why you had to pay your docking fee in advance.
Posted: Sun Sep 14, 2008 8:33 pm
by pagroove
Posted: Sun Sep 14, 2008 9:26 pm
by DaddyHoggy
Don't care about paying as long as I can save when I get there!
Bring it on!
Posted: Tue Sep 16, 2008 5:08 pm
by pagroove
It's very quiet.....before the storm?
Posted: Tue Sep 16, 2008 7:52 pm
by Eric Walch
pagroove wrote:It's very quiet.....before the storm?
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.
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.
Posted: Tue Sep 16, 2008 7:55 pm
by pagroove
Wonder if someone can take a spy
shot of that!
Posted: Wed Sep 17, 2008 9:29 am
by Eric Walch
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.
Posted: Wed Sep 17, 2008 9:53 am
by DaddyHoggy
Go Eric, Go Eric, Go Eric