Arrivals and departures

An area for discussing new ideas and additions to Oolite.

Moderators: another_commander, winston

User avatar
phkb
Impressively Grand Sub-Admiral
Impressively Grand Sub-Admiral
Posts: 4573
Joined: Tue Jan 21, 2014 10:37 pm
Location: Writing more OXPs, because the world needs more OXPs.

Re: Arrivals and departures

Post by phkb »

OK. Fixed for next release. :(
User avatar
Wildeblood
---- E L I T E ----
---- E L I T E ----
Posts: 2275
Joined: Sat Jun 11, 2011 6:07 am
Location: Western Australia

Re: Arrivals and departures

Post by Wildeblood »

phkb wrote:
:(
Be afraid.

Look, here's another one in the same script:-

Code: Select all

this.shipDockedWithStation = function(station) {
	// set up the interface screen, if required
	this._playerDockTime = global.clock.adjustedSeconds;
	var p = player.ship;
	if(p && p.isValid) {
		if (station.hasNPCTraffic && this.$checkStationRoleForView(station)) {
			this._selectedStation = station;
			this.$initInterface(station);
		}
	}
}
You're not even using player.ship.* in this function!

Code: Select all

this.shipDockedWithStation = function(station) {
	// set up the interface screen, if required
	this._playerDockTime = global.clock.adjustedSeconds;
	if (station.hasNPCTraffic && this.$checkStationRoleForView(station)) {
			this._selectedStation = station;
			this.$initInterface(station);
	}
}
BTW, have you checked it works after a player escape pod sequence?
User avatar
phkb
Impressively Grand Sub-Admiral
Impressively Grand Sub-Admiral
Posts: 4573
Joined: Tue Jan 21, 2014 10:37 pm
Location: Writing more OXPs, because the world needs more OXPs.

Re: Arrivals and departures

Post by phkb »

Wildeblood wrote:
BTW, have you checked it works after a player escape pod sequence?
Not yet. Thanks for the tip.
User avatar
phkb
Impressively Grand Sub-Admiral
Impressively Grand Sub-Admiral
Posts: 4573
Joined: Tue Jan 21, 2014 10:37 pm
Location: Writing more OXPs, because the world needs more OXPs.

Re: Arrivals and departures

Post by phkb »

Layne wrote:
Still not sure why the commies ships aren't showing up.
A technical question: I'm trying to display one of the models from Commies as the background on a mission screen. I have "model" set to "[workcom]". However, nothing shows up. I noticed that Commies uses an XML based plist file - could that be the reason? The same is happening for ship models from Anarchies.
User avatar
Norby
---- E L I T E ----
---- E L I T E ----
Posts: 2577
Joined: Mon May 20, 2013 9:53 pm
Location: Budapest, Hungary (Mainly Agricultural Democracy, TL10)
Contact:

Re: Arrivals and departures

Post by Norby »

phkb wrote:
I'm trying to display one of the models from Commies as the background on a mission screen. I have "model" set to "[workcom]". However, nothing shows up. I noticed that Commies uses an XML based plist file - could that be the reason?
No, the reason is that you are not in a communist system and the shipdata contain a conditions part which disable this ship on mission screens also.

A workaround if you make your own shipdata entry using the same model and no conditions or a like_ship with conditions which allow all governments just to overwrite the original conditions.
User avatar
phkb
Impressively Grand Sub-Admiral
Impressively Grand Sub-Admiral
Posts: 4573
Joined: Tue Jan 21, 2014 10:37 pm
Location: Writing more OXPs, because the world needs more OXPs.

Re: Arrivals and departures

Post by phkb »

Ah, got it. Thanks Norby!
User avatar
cim
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 4072
Joined: Fri Nov 11, 2011 6:19 pm

Re: Arrivals and departures

Post by cim »

Norby wrote:
No, the reason is that you are not in a communist system and the shipdata contain a conditions part which disable this ship on mission screens also.
Hmm. I'm not sure that's intended behaviour, there. Most demo ship creation doesn't check conditions - it's just the mission screen one which does.

Something to look after 1.82
User avatar
Redspear
---- E L I T E ----
---- E L I T E ----
Posts: 2635
Joined: Thu Jun 20, 2013 10:22 pm

Re: Arrivals and departures

Post by Redspear »

Wildeblood wrote:
So outraged.
Harsh IMO, very harsh.

Why?
phkb wrote:
So, while I'm really happy to be sharing this, I'm also fairly nervous - I'm playing with things way above my pay grade here! I hope you understand that what I'm saying is that I need help to make sure I haven't broken something horribly, but that the core game of Oolite still continues to play in a satisfactory way. With this much code the potential for unforeseen conflicts and breakages is huge, so I need some feedback from some willing testers on a few issues. Testers will need to pay close attention to their actions as they will have a big impact on the dock list.

...

For the moment, I'm just releasing this as an OXP, rather than OXZ, the reason being it's a lot easier to see and change things in an OXP, and I'd like to encourage people to look inside as much as possible. An OXZ will follow once the code is stable.
phkb couldn't have given much more of a warning as to the current state of the oxp (not oxz).

To your credit Wildeblood, you do help phkb to tidy up the code but it's not really so difficult to draw parallels between code and manners is it?

Getting them right makes things run smoother, run better. Each misstep a PPoF, as you put it, a point of frustration or distress for the user/recipient.

My coding could use a hell of a lot of improvement and I'm sure that my manners aren't perfect.
You seem to favour straight-talking and not be shy about criticism so there it is.
User avatar
Wildeblood
---- E L I T E ----
---- E L I T E ----
Posts: 2275
Joined: Sat Jun 11, 2011 6:07 am
Location: Western Australia

Re: Arrivals and departures

Post by Wildeblood »

Yeah, you're right, Redspear.
Last edited by Wildeblood on Sun May 24, 2015 3:54 pm, edited 1 time in total.
User avatar
phkb
Impressively Grand Sub-Admiral
Impressively Grand Sub-Admiral
Posts: 4573
Joined: Tue Jan 21, 2014 10:37 pm
Location: Writing more OXPs, because the world needs more OXPs.

Re: Arrivals and departures

Post by phkb »

As an OXP in now in play, I've created a new thread in "Expansion Packs" called "Station Dock Control OXP". Version 0.3.0 has just been released which addresses a few of the bugs Layne reported, but a few others, and fixes the code issues identified by Wildeblood.

Link to new thread: https://bb.oolite.space/viewtopic.php?f= ... 74#p237074
User avatar
Redspear
---- E L I T E ----
---- E L I T E ----
Posts: 2635
Joined: Thu Jun 20, 2013 10:22 pm

Re: Arrivals and departures

Post by Redspear »

Wildeblood wrote:
Yeah, you're right, Redspear.
Takes courage to say and is to be applauded.

You're an asset to these boards with your coding skills and innovative oxps (of which I'm a fan).
Anyway, not for the first time, I've probably said enough... Thanks for the edit.
User avatar
Wildeblood
---- E L I T E ----
---- E L I T E ----
Posts: 2275
Joined: Sat Jun 11, 2011 6:07 am
Location: Western Australia

Re: Arrivals and departures

Post by Wildeblood »

Wildeblood wrote: Fri May 15, 2015 4:14 pm

Code: Select all

this.shipLaunchedFromStation = function (station) {
    if (player.ship.fuel < 7) {
        station.dockPlayer();
        player.consoleMessage("Forgot something?", 5);
    }
}
Why did this one never make it into the Sensible Tweaks topic? :lol:
Post Reply