Page 1 of 1

Station markets and interface screens

Posted: Tue Feb 12, 2013 5:22 am
by Wildeblood
Every station has an F3 screen, right? If you want to deter the player from buying equipment, you set the tech level really low and the equipment price factor really high, but you can't actually prevent the player re-fuelling at a station, except by blocking the actual guiScreen change?

Similarly, does every station have an F8 market? If not, how do I test for presence or absence of a market?

Re: Does every station have a market?

Posted: Tue Feb 12, 2013 7:42 am
by cim
Wildeblood wrote:
but you can't actually prevent the player re-fuelling at a station
You can in 1.77. Give the station the script_info key "oolite-barred-equipment" = ("EQ_FUEL") (Works for other core equipment items too - just add them to the list)

All stations have a market.

Re: Does every station have a market?

Posted: Tue Feb 12, 2013 8:27 am
by Thargoid
It is however possible to block access to the market screen via use of a mission screen. See Lave Academy for an example. The market screen is there, but not accessible.

Re: Does every station have a market?

Posted: Tue Feb 12, 2013 11:31 am
by Commander McLane
Another way of effectively removing the market is to set all prices and quantities to 0. The market screen remains accessible, but the player can't do anything useful (unless you deem selling stuff for nothing to be useful).

Re: Does every station have a market?

Posted: Wed Feb 13, 2013 11:31 pm
by Switeck
Storing items at a 0-price station market can be useful if you're cleaning up a huge debris field and you don't want others to get it...

Re: Station markets and interface screens

Posted: Tue Feb 19, 2013 7:47 am
by Wildeblood
Thanks for the replies, guys. I have a follow-up question: do, and should, station interfaces persist after you launch from the station?

That is, on shipDockedWithStation I set up an interface screen, but only if it's a new station I haven't already docked with, then I launch and re-dock. On re-docking my set-up code doesn't run, but the interface screen is still available. My observation is that this works, but is it the intended behaviour, or is it likely to be "fixed" in future Oolite versions?

(Also, is it possible to set interfaces before docking with a station?) (I've no reason for asking that one, it's just idle curiosity.)

Re: Station markets and interface screens

Posted: Tue Feb 19, 2013 8:01 am
by cim
Yes, that's intended behaviour, and no, you don't have to be docked with the station to set up the interface - all the core interfaces are set up on witchspace exit. If you do run the set up code on every docking it's harmless, though, as it will just overwrite the previous one (also intentional: interfaces thematically bound to the ship should probably be present at every station, and the easiest way to do this is just to unconditionally set it up on docking)

Re: Station markets and interface screens

Posted: Tue Feb 19, 2013 10:21 am
by Rorschachhamster
Switeck wrote:
Storing items at a 0-price station market can be useful if you're cleaning up a huge debris field and you don't want others to get it...
Hmmm. Is it possible to make prices negative, so you would have to pay to sell? 8)

Re: Station markets and interface screens

Posted: Tue Feb 19, 2013 11:32 am
by Commander McLane
Rorschachhamster wrote:
Switeck wrote:
Storing items at a 0-price station market can be useful if you're cleaning up a huge debris field and you don't want others to get it...
Hmmm. Is it possible to make prices negative, so you would have to pay to sell? 8)
No.

Re: Station markets and interface screens

Posted: Tue Feb 19, 2013 12:00 pm
by Eric Walch
Wildeblood wrote:
Thanks for the replies, guys. I have a follow-up question: do, and should, station interfaces persist after you launch from the station?)
As Cim also wrote: it is a station feature, not a docking feature. e.g. for random hits, I only define the interface once on spawning the spacebar. Because the interface does not change in time, there no need to set it on every docking.