Page 11 of 11

Re: Arrivals and departures

Posted: Thu May 21, 2015 3:36 am
by phkb
OK. Fixed for next release. :(

Re: Arrivals and departures

Posted: Thu May 21, 2015 3:53 am
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?

Re: Arrivals and departures

Posted: Thu May 21, 2015 4:01 am
by phkb
Wildeblood wrote:
BTW, have you checked it works after a player escape pod sequence?
Not yet. Thanks for the tip.

Re: Arrivals and departures

Posted: Thu May 21, 2015 8:15 am
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.

Re: Arrivals and departures

Posted: Thu May 21, 2015 8:34 am
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.

Re: Arrivals and departures

Posted: Thu May 21, 2015 8:42 am
by phkb
Ah, got it. Thanks Norby!

Re: Arrivals and departures

Posted: Thu May 21, 2015 6:12 pm
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

Re: Arrivals and departures

Posted: Thu May 21, 2015 7:44 pm
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.

Re: Arrivals and departures

Posted: Fri May 22, 2015 1:15 am
by Wildeblood
Yeah, you're right, Redspear.

Re: Arrivals and departures

Posted: Fri May 22, 2015 6:32 am
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

Re: Arrivals and departures

Posted: Mon May 25, 2015 1:31 am
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.

Re: Arrivals and departures

Posted: Sat Feb 24, 2024 8:41 am
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: