GRS buoyRepair.oxp

Discussion and information relevant to creating special missions, new ships, skins etc.

Moderators: another_commander, winston

Post Reply
User avatar
Cmdr James
Commodore
Commodore
Posts: 1357
Joined: Tue Jun 05, 2007 10:43 pm
Location: Berlin

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

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

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

Post by JensAyton »

A reasonable reason for that would be that something attacked the station. :-)
User avatar
Eric Walch
Slightly Grand Rear Admiral
Slightly Grand Rear Admiral
Posts: 5536
Joined: Sat Jun 16, 2007 3:48 pm
Location: Netherlands

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

Post 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 --
User avatar
pagroove
---- E L I T E ----
---- E L I T E ----
Posts: 3035
Joined: Wed Feb 21, 2007 11:52 pm
Location: On a famous planet

Post by pagroove »

OMG it's coming a new Oolite dream is coming true :shock:
For P.A. Groove's music check
https://soundcloud.com/p-a-groove
Famous Planets v 2.7. (for Povray)
Image
https://bb.oolite.space/viewtopic.php?f=4&t=13709
User avatar
Eric Walch
Slightly Grand Rear Admiral
Slightly Grand Rear Admiral
Posts: 5536
Joined: Sat Jun 16, 2007 3:48 pm
Location: Netherlands

Post by Eric Walch »

pagroove wrote:
OMG it's coming a new Oolite dream is coming true :shock:
That dream could explode when you realise why you had to pay your docking fee in advance. :twisted:
User avatar
pagroove
---- E L I T E ----
---- E L I T E ----
Posts: 3035
Joined: Wed Feb 21, 2007 11:52 pm
Location: On a famous planet

Post by pagroove »

:twisted:
For P.A. Groove's music check
https://soundcloud.com/p-a-groove
Famous Planets v 2.7. (for Povray)
Image
https://bb.oolite.space/viewtopic.php?f=4&t=13709
User avatar
DaddyHoggy
Intergalactic Spam Assassin
Intergalactic Spam Assassin
Posts: 8501
Joined: Tue Dec 05, 2006 9:43 pm
Location: Newbury, UK
Contact:

Post by DaddyHoggy »

Don't care about paying as long as I can save when I get there!

Bring it on!

:)
Selezen wrote:
Apparently I was having a DaddyHoggy moment.
Oolite Life is now revealed here
User avatar
pagroove
---- E L I T E ----
---- E L I T E ----
Posts: 3035
Joined: Wed Feb 21, 2007 11:52 pm
Location: On a famous planet

Post by pagroove »

It's very quiet.....before the storm? :twisted:
For P.A. Groove's music check
https://soundcloud.com/p-a-groove
Famous Planets v 2.7. (for Povray)
Image
https://bb.oolite.space/viewtopic.php?f=4&t=13709
User avatar
Eric Walch
Slightly Grand Rear Admiral
Slightly Grand Rear Admiral
Posts: 5536
Joined: Sat Jun 16, 2007 3:48 pm
Location: Netherlands

Post by Eric Walch »

pagroove wrote:
It's very quiet.....before the storm? :twisted:
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.
User avatar
pagroove
---- E L I T E ----
---- E L I T E ----
Posts: 3035
Joined: Wed Feb 21, 2007 11:52 pm
Location: On a famous planet

Post by pagroove »

Wonder if someone can take a spy 8) shot of that! :twisted:
For P.A. Groove's music check
https://soundcloud.com/p-a-groove
Famous Planets v 2.7. (for Povray)
Image
https://bb.oolite.space/viewtopic.php?f=4&t=13709
User avatar
Eric Walch
Slightly Grand Rear Admiral
Slightly Grand Rear Admiral
Posts: 5536
Joined: Sat Jun 16, 2007 3:48 pm
Location: Netherlands

Post by Eric Walch »

GRS just got conformation that their station at Vetitice in galaxy 1 finished their station turning. :
Image
Vetitice main station with in the background a large boa docking on the right side of the GRS station.

Image
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.
User avatar
DaddyHoggy
Intergalactic Spam Assassin
Intergalactic Spam Assassin
Posts: 8501
Joined: Tue Dec 05, 2006 9:43 pm
Location: Newbury, UK
Contact:

Post by DaddyHoggy »

:shock: Go Eric, Go Eric, Go Eric :D
Selezen wrote:
Apparently I was having a DaddyHoggy moment.
Oolite Life is now revealed here
Post Reply