Nope, not guilty yerhonna...Frame wrote:is this not one of thargoids oxps doing this.
I was going to do it in traffic control, but never did in the end as it didn't fit the tone in the end when the feature was implemented.
Moderators: winston, another_commander
Nope, not guilty yerhonna...Frame wrote:is this not one of thargoids oxps doing this.
Thanks for your efforts, I'll add in a timer instead of doing the actual straight away docking..Eric Walch wrote:
One other strange thing: When I launch from a F8 screen, the F8 screen is still present on re-docking. When I launch from a F6 screen I re-dock in the F6 screen, but with no stars on it. Pressing F6 brings the stars back. On docking I should always get the F5 screen, so somehow I think you force a re-dock before oolite has registered the launch completely. It might be worth to try docking at a timer at a very short delay giving oolite time to complete all sequences.
....
When you have time to look at the code, you might look at the new ways of adding ships. With the new methods addShips, your code receives a reference back to the added ships, so you can avoid some of the search to just spawned stations. It also saves the check to see if you found the right station.
Code: Select all
mission.runScreen({titleKey:"Frame_save_oxp_title", model:"pirate"})
Code: Select all
[system] Exception raised during posting of notification. Ignored. exception: '*** -[NSPlaceholderMutableString initWithString:]: nil argument' invoked observer method: '*** -[NSTextField textDidEndEditing:]' observer: 0x21889cd0 notification name: 'NSTextDidEndEditingNotification'
Code: Select all
"SAVE ANYWHERE OXP"
That is something i noticed, but I thought it was rather cosmetic, and had not looked into it.. However, it affects another OXP in the works... so titleKey is broken..Eric Walch wrote:I found the problem. It seems an Oolite bug and has nothing to do with your oxp. I don't know why it happens to me and not with you. When I run in the console:Nothing happens but in the log I get:Code: Select all
mission.runScreen({titleKey:"Frame_save_oxp_title", model:"pirate"})
This results in aborting any further code execution. The problem is in titleKey:"Frame_save_oxp_title" When I use title:"Frame_save_oxp_title" instead, everything works.Code: Select all
[system] Exception raised during posting of notification. Ignored. exception: '*** -[NSPlaceholderMutableString initWithString:]: nil argument' invoked observer method: '*** -[NSTextField textDidEndEditing:]' observer: 0x21889cd0 notification name: 'NSTextDidEndEditingNotification'
But others might encounter similar problems so I advise to use "title" instead of "titleKey" until this bug is solved.
It was not working, but after a second look I noticed you missed the essential part:Frame wrote:Edit Like this
Code: Select all
this.dockplayer = function() { this.stationfortimer.saveAnywhereLandingClearence = this.stationfortimer.requiresDockingClearance this.stationfortimer.dockPlayer() this.stationfortimer.requiresDockingClearance = this.stationfortimer.saveAnywhereLandingClearence }
Code: Select all
this.dockplayer = function()
{
this.stationfortimer.saveAnywhereLandingClearence = this.stationfortimer.requiresDockingClearance
this.stationfortimer.requiresDockingClearance = false;
this.stationfortimer.dockPlayer()
this.stationfortimer.requiresDockingClearance = this.stationfortimer.saveAnywhereLandingClearence
}
stomps and puffsKaks wrote:To be precise, the whole of titleKey isn't quite broken: it's the bit that keeps an eye for possible oxp mistakes that's broken!
As long as you enter the correct key, and you plist is actually readable, titleKey does work in 1.74.x.
In this particular case you fed it wrong data, and it spewed gobbledigook. After fixing it, if you feed it the same wrong data it still won't work!
However, it will give you a more readable error message!
Code: Select all
mission.runScreen({ titleKey:"Frame_save_title",messageKey:"Frame_SAVE_brief6" },null );
Code: Select all
{
"Frame_SAVE_brief1" = "---SAVE ANYWHERE OXP MESSAGE\n\nGreetings Commander, you now have to save your game manually and press launch, shortly after launch you will be warped back to the OXP station. This will also happen when you load the saved commander file";
"Frame_SAVE_brief2" = "---SAVE ANYWHERE OXP MESSAGE\n\nGreetings Commander, you have loaded a OXP save anywhere active commander file, you will shortly, in about 20 seconds be taken to the OXP station where you saved the game";
"Frame_SAVE_brief3" = "---SAVE ANYWHERE OXP MESSAGE\n\nSorry Commander, you cant save in this system, there is no main stations which is a prerequiste";
"Frame_SAVE_brief4" = "---SAVE ANYWHERE OXP MESSAGE\n\nGreetings Commander, you have selected to save at this OXP station, you will be transfered shortly to the main station";
"Frame_SAVE_brief5" = "---SAVE ANYWHERE OXP MESSAGE\n\nSorry Commander, you are not allowed to enter this screen at the moment";
"Frame_SAVE_brief6" = "---SAVE ANYWHERE OXP MESSAGE\n\nCommander, SAVE ANYWHERE ACTIVE COMMANDERFILE\n Configuring system";
"Frame_SAVE_brief7" = "---SAVE ANYWHERE OXP MESSAGE\n\nCommander, transferring successful";
"Frame_SAVE_brief8" = "---SAVE ANYWHERE OXP MESSAGE\n\nSorry Commander, You can not save at this OXP station";
"Frame_SAVE_brief9" = "---SAVE ANYWHERE OXP MESSAGE\n\nSorry Commander, You have loaded a SAVE ANYWHERE OXP commander file.\nBut the OXP containing the station seems not to be installed or is in a non working state";
"Frame_save_title" = "SAVE ANYWHERE OXP";
"Frame_save_title2" = "SAVE ANYWHERE OXP";
}
No need to put that in the documentation. The oxp should "save & restore" the legal status. (ThargoidWar.oxps also does that when responding to a station attack with illegal goods in your hold, so it is solvable by script.)Switeck wrote:I doubt it's worth preventing, but it's probably worth a note in the documentation.
Frame wrote:stomps and puffs
At the start of the process simply go through the manifest and populate an array with the content of the manifest (so you have an array of numbers corresponding to the cargo content of the hold in sequence) and then clear the manifest.Frame wrote:Remove cargo and give it back upon Docking..while I'm unsure with my head out the code on how to-do this, or if it is even possible to do it subtle without the player noticing... this does requires an at least 3 elements long array as a mission variable...