Re: Scripting requests
Posted: Fri Jun 01, 2012 9:53 pm
It was only a flippant response, is all... ignore.
For information and discussion about Oolite.
https://bb.oolite.space/
station.hasShipyard : Boolean (read/write) (read only for mainStations)
to give the result of shipdata key has_shipyard
.I think read only should be fine for all stations.Capt. Murphy wrote:Hi,
Requestingstation.hasShipyard : Boolean (read/write) (read only for mainStations)
to give the result of shipdata keyhas_shipyard
.
hasShipyard
added as read-only property to the OOJSStation class on r4980.Easier there would be to use guiScreenChanged and mission.runScreen to cancel the shipyard screen.Switeck wrote:Maybe a mission/campaign forces you to use a certain ship? You can't exactly sell it if there's no shipyard.
That's a reason I can understand. Consistency is a worthwhile goal. It would be interesting to know, though, how many OXP stations are actually making use of a fuzzy boolean in the first place.Capt. Murphy wrote:The reason for read/write is because it can be a fuzzy boolean in shipdata.plist, and I was after a way of ensuring that if an OXP station in a particular system had a shipyard on a visit to that system/station, on a return visit the OXP station would still have a shipyard. I can work around it though if you really think it's a bad idea to make it read/write.
has_shipyard
when I responded rather instinctively. I had in mind that a certain station either would or wouldn't have a shipyard for good reasons. At the same time I am wary of a new generation of OXP-creators and a tendency to use every provided scripting ability for quick-and-dirty cheat OXPs under the flag of "if it can be done, it cannot be wrong". A development which—for me, at least—tends to make Oolite less and less attractive. Thus I'm not overly keen on making everything writeable.Heh .-) I'd think it's a bug in the offering OXP then .-)Switeck wrote:Maybe a mission/campaign forces you to use a certain ship? You can't exactly sell it if there's no shipyard. :lol:
This should be working as of the current nightly build (r5016). Let me know if you have any problems with it.Wildeblood wrote:Can we have the player ship cross-hairs dictionary/file changeable, the same way the HUD file is, please? Currently, to alter the cross-hairs on the fly, one has to embed the cross-hairs dictionary in a HUD file and switch the whole HUD file. It's easily done, but can cause a rapid proliferation of HUD files.
crosshairs.plist
and an arbitrary (should-be-unique) name.crosshair_file
" parameter with the filename.player.ship.crosshairs
to the filename by scriptcrosshair_file
" and "crosshairs
" keys: if so, the "crosshair_file
" key takes precedence.player.ship.hud
, then player.ship.crosshairs
will be reset to the new HUD's default.crosshair_file
", then player.ship.crosshairs
will be null. Setting player.ship.crosshairs
to be null will revert the HUD to its default crosshairs (however they were specified).It is normal. In order to have the watermark text as it appears on the nightlies, you must compile usingWildeblood wrote:I just compiled r5016 from source and it doesn't have the version number display in the top-right of the screen, is that to be expected?
make release-snapshot
That will only appear if SNAPSHOT_BUILD was set as a build option. The "release-snapshot" build target (and equivalents for deps and debian package) set it, the others don't.Wildeblood wrote:I just compiled r5016 from source and it doesn't have the version number display in the top-right of the screen, is that to be expected?
cim wrote:This should be working as of the current nightly build (r5016). Let me know if you have any problems with it.Wildeblood wrote:Can we have the player ship cross-hairs dictionary/file changeable, the same way the HUD file is, please? Currently, to alter the cross-hairs on the fly, one has to embed the cross-hairs dictionary in a HUD file and switch the whole HUD file. It's easily done, but can cause a rapid proliferation of HUD files.
Crosshair definitions go in a file in Config with the same format as the built-incrosshairs.plist
and an arbitrary (should-be-unique) name.
To apply a crosshair definition file to a HUD:
- give the HUD a "crosshair_file
" parameter with the filename.
- setplayer.ship.crosshairs
to the filename by script
HUD plists can have both "crosshair_file
" and "crosshairs
" keys: if so, the "crosshair_file
" key takes precedence.
If you changeplayer.ship.hud
, thenplayer.ship.crosshairs
will be reset to the new HUD's default.
If the HUD default crosshair is in place and not generated through "crosshair_file
", thenplayer.ship.crosshairs
will be null. Settingplayer.ship.crosshairs
to be null will revert the HUD to its default crosshairs (however they were specified).