Oolite Bulletins

For information and discussion about Oolite.
It is currently Mon Jul 24, 2017 12:33 am

All times are UTC




Post new topic  Reply to topic  [ 811 posts ]  Go to page Previous 149 50 51 52 5355 Next
Author Message
 Post subject: Re: Scripting requests
PostPosted: Mon Dec 16, 2013 1:11 pm 
Offline
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral

Joined: Wed Feb 28, 2007 7:54 am
Posts: 4881
Quote:
2) Guuys, there's 4 more function keys after F8, they could be used for something useful in the future.
Ehm, actually 3. F12 on the Win/Linux builds (not sure about Mac) toggles full screen on/off.


Top
   
 Post subject: Re: Scripting requests
PostPosted: Mon Dec 16, 2013 9:53 pm 
Offline
Intergalactic Spam Assassin
Intergalactic Spam Assassin
User avatar

Joined: Thu Dec 14, 2006 9:08 am
Posts: 9520
Location: a Hacker Outpost in a moderately remote area
Quote:
2) Have a key for console message log just like there's ~ for comms log.
Console messages are not logged. That's what distinguishes them from comms messages. If you want a message to be logged, use a comms message.

_________________
The Story — The Career — The OXPs


Top
   
 Post subject: Re: Scripting requests
PostPosted: Wed Dec 18, 2013 8:14 am 
Offline
---- E L I T E ----
---- E L I T E ----

Joined: Tue Nov 09, 2010 1:44 pm
Posts: 1393
One more thing I just remembered:
I thought I saw it mentioned somewhere in the vast Progress thread that 1-8 keys have been decoupled from F1-F8. I thought that we could bind 1-8 instead to the primable equipment in order of the player acquiring them. Equipment granted automatically (such as Chupa missile ID) would be on 1, Dock Assist I bought first would be on 2 and Telescope would be at 3. I could have up to 8 such pieces of equipment and I wouldn't have to worry about cycling through them...
This would save players a lot of hassle with Shift+N cycling.


Top
   
 Post subject: Re: Scripting requests
PostPosted: Wed Dec 18, 2013 8:51 am 
Offline
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
User avatar

Joined: Fri Nov 11, 2011 6:19 pm
Posts: 4007
1.79 has two fast activation keys for primable equipment, plus you can have a third item on 'n' as usual. Do many people really have that much equipment on board their ships that they need instant access to four or more primable items?

Another thing that might be useful if you do have that much - you can customise your HUD to include a "drawPrimedEquipment:" dial with "n_bars" > 1

The other thing is that not every keyboard gives particularly easy access to the Fn keys, so we'd prefer to keep the default bindings for 1-8 as they are.

_________________
OXPs: [EliteWiki] New Cargoes, [EliteWiki] Skilled NPCs, [EliteWiki] Curse of the Black Sunspot, and more


Top
   
 Post subject: Re: Scripting requests
PostPosted: Wed Dec 18, 2013 2:07 pm 
Offline
---- E L I T E ----
---- E L I T E ----

Joined: Tue Nov 09, 2010 1:44 pm
Posts: 1393
Quote:
Quote:
2) Guuys, there's 4 more function keys after F8, they could be used for something useful in the future.
Ehm, actually 3. F12 on the Win/Linux builds (not sure about Mac) toggles full screen on/off.
*slaps forehead* Right.

And expanding on the idea of using F9-F11, I just thought we could slap some sort of in-game Ooniverse info under F10, coded similar to the F4 menu, and just kept separately to avoid undue clutter in F4. Thoughts.


Top
   
 Post subject: Re: Scripting requests
PostPosted: Wed Mar 05, 2014 9:16 pm 
Offline
---- E L I T E ----
---- E L I T E ----
User avatar

Joined: Sun Apr 29, 2012 2:23 pm
Posts: 883
Location: United Kingdom
I'm sure this is possible but I can't find any mention of it anywhere. Is there a way of making a carrier/station refuse docking clearance by script? For example, make a station/carrier refuse docking clearance to player unless a specific variable was enabled?

_________________
Location: Galaxy 5 | Ship: Cobra Mark III | Rank: ★★★ E L I T E ★★★| Legal Status: Clean
Taxi Galactica | Her Imperial Majesty's Space Navy


Top
   
 Post subject: Re: Scripting requests
PostPosted: Wed Mar 05, 2014 11:40 pm 
Offline
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
User avatar

Joined: Fri Nov 11, 2011 6:19 pm
Posts: 4007
The [url=http://wiki.alioth.net/index.php/Oolite_JavaScript_Reference:_ship_script_event_handlers#Docks_Only]acceptDockingRequestFrom[/url] event is probably what you're looking for, if you want to refuse docking clearance to some ships but not others.

If you just want to enable and disable the dock, the various dock properties are probably sufficient. Note that if you really want to keep the player out - not just fine them for docking without clearance - disallowedDockingCollides is needed.

_________________
OXPs: [EliteWiki] New Cargoes, [EliteWiki] Skilled NPCs, [EliteWiki] Curse of the Black Sunspot, and more


Top
   
 Post subject: Re: Scripting requests
PostPosted: Fri Mar 07, 2014 10:32 pm 
Offline
---- E L I T E ----
---- E L I T E ----
User avatar

Joined: Sun Apr 29, 2012 2:23 pm
Posts: 883
Location: United Kingdom
I can't seem to get the acceptDockingRequestFrom function to work. I have the following:
Code:
this.acceptDockingRequestFrom = function(ship)
{
	if (ship.scanClass == "CLASS_PLAYER")
	{
		return false;
	}
}
But doesn't seem to make a difference... :(

_________________
Location: Galaxy 5 | Ship: Cobra Mark III | Rank: ★★★ E L I T E ★★★| Legal Status: Clean
Taxi Galactica | Her Imperial Majesty's Space Navy


Top
   
 Post subject: Re: Scripting requests
PostPosted: Fri Mar 07, 2014 10:58 pm 
Offline
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
User avatar

Joined: Fri Nov 11, 2011 6:19 pm
Posts: 4007
Quote:
I can't seem to get the acceptDockingRequestFrom function to work. I have the following:
Code:
this.acceptDockingRequestFrom = function(ship)
{
	if (ship.scanClass == "CLASS_PLAYER")
	{
		return false;
	}
}
But doesn't seem to make a difference... :(
You probably want to return true if the ship is not the player, and ship.isPlayer is a more reliable test. Still, that should be denying docking to the player - unless you've placed it in the wrong script: it needs to be in the dock's ship script, not the station's (because you might have multiple docks with different rules)

_________________
OXPs: [EliteWiki] New Cargoes, [EliteWiki] Skilled NPCs, [EliteWiki] Curse of the Black Sunspot, and more


Top
   
 Post subject: Re: Scripting requests
PostPosted: Sat Mar 08, 2014 8:36 pm 
Offline
---- E L I T E ----
---- E L I T E ----
User avatar

Joined: Sun Apr 29, 2012 2:23 pm
Posts: 883
Location: United Kingdom
Still isn't working, this is the whole script:
Code:
"use strict";

this.name 			= "himsn_carrier_dock.js";
this.author         = "Pleb";
this.copyright      = "(C) 2014 Pleb.";
this.licence        = "CC-NC-by-SA 2.0";
this.version 		= "0.6";

this.shipSpawned = function ()
{
	this.ship.allowsDocking = true;
}

this.acceptDockingRequestFrom = function(ship)
{
	if (ship.isPlayer)
	{
		return false;
	}
	else
	{
		return true;
	}
}

_________________
Location: Galaxy 5 | Ship: Cobra Mark III | Rank: ★★★ E L I T E ★★★| Legal Status: Clean
Taxi Galactica | Her Imperial Majesty's Space Navy


Top
   
 Post subject: Re: Scripting requests
PostPosted: Sat Mar 08, 2014 8:58 pm 
Offline
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
User avatar

Joined: Fri Nov 11, 2011 6:19 pm
Posts: 4007
Should be fixed in commit e57bac0

It should also work now if you use the docking computer.

Thanks for the report

_________________
OXPs: [EliteWiki] New Cargoes, [EliteWiki] Skilled NPCs, [EliteWiki] Curse of the Black Sunspot, and more


Top
   
 Post subject: Re: Scripting requests
PostPosted: Sun Mar 09, 2014 11:39 am 
Offline
---- E L I T E ----
---- E L I T E ----
User avatar

Joined: Sun Apr 29, 2012 2:23 pm
Posts: 883
Location: United Kingdom
Yay! This works now, thanks cim! :mrgreen:

_________________
Location: Galaxy 5 | Ship: Cobra Mark III | Rank: ★★★ E L I T E ★★★| Legal Status: Clean
Taxi Galactica | Her Imperial Majesty's Space Navy


Top
   
 Post subject: Re: Scripting requests
PostPosted: Sat Mar 15, 2014 10:13 am 
Offline
---- E L I T E ----
---- E L I T E ----
User avatar

Joined: Sun Apr 29, 2012 2:23 pm
Posts: 883
Location: United Kingdom
Just another quick one regarding docks, if the disallowedDockingCollides is read-only, as specified on the wiki, how would I set this to true to ensure that it is impossible to dock?

_________________
Location: Galaxy 5 | Ship: Cobra Mark III | Rank: ★★★ E L I T E ★★★| Legal Status: Clean
Taxi Galactica | Her Imperial Majesty's Space Navy


Top
   
 Post subject: Re: Scripting requests
PostPosted: Sat Mar 15, 2014 10:23 am 
Offline
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
User avatar

Joined: Fri Nov 11, 2011 6:19 pm
Posts: 4007
Documentation fixed. (It's been read/write all along...)

Thanks for testing out all these new features.

_________________
OXPs: [EliteWiki] New Cargoes, [EliteWiki] Skilled NPCs, [EliteWiki] Curse of the Black Sunspot, and more


Top
   
 Post subject: Re: Scripting requests
PostPosted: Sat Mar 15, 2014 10:51 am 
Offline
---- E L I T E ----
---- E L I T E ----
User avatar

Joined: Sun Apr 29, 2012 2:23 pm
Posts: 883
Location: United Kingdom
I'm not sure whether it's me missing something or this particular function not working the way it's supposed to (but I'm guessing it's probably the first one), but I'm still able to dock. I can disallow docking clearance but I can still dock:
Code:
"use strict";

this.name 			= "himsn_station_dock.js";
this.author         = "Pleb";
this.copyright      = "(C) 2014 Pleb.";
this.licence        = "CC-NC-by-SA 2.0";
this.version 		= "0.7";

this.shipSpawned = function ()
{
	this.ship.allowsDocking = false;
	this.ship.disallowedDockingCollides = true;
}

this.acceptDockingRequestFrom = function(ship)
{
	return false;
}
This is a more simplified version of the actual script but even this will not work... :(

And thank you for all the new features, I wouldn't be able to implement Gimi's ideas for the HIMSN OXZ without them! :D

_________________
Location: Galaxy 5 | Ship: Cobra Mark III | Rank: ★★★ E L I T E ★★★| Legal Status: Clean
Taxi Galactica | Her Imperial Majesty's Space Navy


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic  [ 811 posts ]  Go to page Previous 149 50 51 52 5355 Next

All times are UTC


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
cron
Powered by phpBB® Forum Software © phpBB Limited