Ehm, actually 3. F12 on the Win/Linux builds (not sure about Mac) toggles full screen on/off.Zireael wrote:2) Guuys, there's 4 more function keys after F8, they could be used for something useful in the future.
Scripting requests
Moderators: winston, another_commander
-
- Quite Grand Sub-Admiral
- Posts: 6681
- Joined: Wed Feb 28, 2007 7:54 am
Re: Scripting requests
- Commander McLane
- ---- E L I T E ----
- Posts: 9520
- Joined: Thu Dec 14, 2006 9:08 am
- Location: a Hacker Outpost in a moderately remote area
- Contact:
Re: Scripting requests
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.Zireael wrote:2) Have a key for console message log just like there's ~ for comms log.
Re: Scripting requests
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.
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.
Re: Scripting requests
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.
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.
Re: Scripting requests
*slaps forehead* Right.another_commander wrote:Ehm, actually 3. F12 on the Win/Linux builds (not sure about Mac) toggles full screen on/off.Zireael wrote:2) Guuys, there's 4 more function keys after F8, they could be used for something useful in the future.
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.
Re: Scripting requests
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?
Desktop PC: CPU: Intel i7-4790K Quad Core 4.4GHz (Turbo-Charged) GPU: Nvidia GeForce GTX 1080Ti RAM: 32GB DDR3
Laptop PC: CPU: Intel i5-10300H Quad Core 4.5GHz (Turbo-Charged) GPU: Nvidia GeForce GTX 1650 RAM: 32GB DDR4
Laptop PC: CPU: Intel i5-10300H Quad Core 4.5GHz (Turbo-Charged) GPU: Nvidia GeForce GTX 1650 RAM: 32GB DDR4
Re: Scripting requests
The
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 -
[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.Re: Scripting requests
I can't seem to get the But doesn't seem to make a difference...
acceptDockingRequestFrom
function to work. I have the following: Code: Select all
this.acceptDockingRequestFrom = function(ship)
{
if (ship.scanClass == "CLASS_PLAYER")
{
return false;
}
}
Desktop PC: CPU: Intel i7-4790K Quad Core 4.4GHz (Turbo-Charged) GPU: Nvidia GeForce GTX 1080Ti RAM: 32GB DDR3
Laptop PC: CPU: Intel i5-10300H Quad Core 4.5GHz (Turbo-Charged) GPU: Nvidia GeForce GTX 1650 RAM: 32GB DDR4
Laptop PC: CPU: Intel i5-10300H Quad Core 4.5GHz (Turbo-Charged) GPU: Nvidia GeForce GTX 1650 RAM: 32GB DDR4
Re: Scripting requests
You probably want to return true if the ship is not the player, andPleb wrote:I can't seem to get theacceptDockingRequestFrom
function to work. I have the following:But doesn't seem to make a difference...Code: Select all
this.acceptDockingRequestFrom = function(ship) { if (ship.scanClass == "CLASS_PLAYER") { return false; } }
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)Re: Scripting requests
Still isn't working, this is the whole script:
Code: Select all
"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;
}
}
Desktop PC: CPU: Intel i7-4790K Quad Core 4.4GHz (Turbo-Charged) GPU: Nvidia GeForce GTX 1080Ti RAM: 32GB DDR3
Laptop PC: CPU: Intel i5-10300H Quad Core 4.5GHz (Turbo-Charged) GPU: Nvidia GeForce GTX 1650 RAM: 32GB DDR4
Laptop PC: CPU: Intel i5-10300H Quad Core 4.5GHz (Turbo-Charged) GPU: Nvidia GeForce GTX 1650 RAM: 32GB DDR4
Re: Scripting requests
Should be fixed in commit
It should also work now if you use the docking computer.
Thanks for the report
e57bac0
It should also work now if you use the docking computer.
Thanks for the report
Re: Scripting requests
Yay! This works now, thanks cim!
Desktop PC: CPU: Intel i7-4790K Quad Core 4.4GHz (Turbo-Charged) GPU: Nvidia GeForce GTX 1080Ti RAM: 32GB DDR3
Laptop PC: CPU: Intel i5-10300H Quad Core 4.5GHz (Turbo-Charged) GPU: Nvidia GeForce GTX 1650 RAM: 32GB DDR4
Laptop PC: CPU: Intel i5-10300H Quad Core 4.5GHz (Turbo-Charged) GPU: Nvidia GeForce GTX 1650 RAM: 32GB DDR4
Re: Scripting requests
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?Desktop PC: CPU: Intel i7-4790K Quad Core 4.4GHz (Turbo-Charged) GPU: Nvidia GeForce GTX 1080Ti RAM: 32GB DDR3
Laptop PC: CPU: Intel i5-10300H Quad Core 4.5GHz (Turbo-Charged) GPU: Nvidia GeForce GTX 1650 RAM: 32GB DDR4
Laptop PC: CPU: Intel i5-10300H Quad Core 4.5GHz (Turbo-Charged) GPU: Nvidia GeForce GTX 1650 RAM: 32GB DDR4
Re: Scripting requests
Documentation fixed. (It's been read/write all along...)
Thanks for testing out all these new features.
Thanks for testing out all these new features.
Re: Scripting requests
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:
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!
Code: Select all
"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;
}
And thank you for all the new features, I wouldn't be able to implement Gimi's ideas for the HIMSN OXZ without them!
Desktop PC: CPU: Intel i7-4790K Quad Core 4.4GHz (Turbo-Charged) GPU: Nvidia GeForce GTX 1080Ti RAM: 32GB DDR3
Laptop PC: CPU: Intel i5-10300H Quad Core 4.5GHz (Turbo-Charged) GPU: Nvidia GeForce GTX 1650 RAM: 32GB DDR4
Laptop PC: CPU: Intel i5-10300H Quad Core 4.5GHz (Turbo-Charged) GPU: Nvidia GeForce GTX 1650 RAM: 32GB DDR4