Weapons safety toggle and ECM
Moderators: winston, another_commander
Weapons safety toggle and ECM
I think the ECM system should count as a "weapon" for the purpose of the weapon systems off/on toggle. Even if it doesn't count as a crime, I still can't imagine all the NPC ships around a station appreciate getting blasted with the ECM jamming signal when I fat-finger a key; it also makes conceptual sense, as like the guns and missiles it's a system you're only supposed to use in combat.
-
- Quite Grand Sub-Admiral
- Posts: 6856
- Joined: Wed Feb 28, 2007 7:54 am
Re: Weapons safety toggle and ECM
Makes sense. I'll make the change shortly and you should be able to test a binary containing it later today.
-
- Quite Grand Sub-Admiral
- Posts: 6856
- Joined: Wed Feb 28, 2007 7:54 am
Re: Weapons safety toggle and ECM
Done. You can find the inclusion of ECM in the weapons that get toggled on/off in pre-release 1.91.0.7679-250703-49e991a.
- Wildeblood
- ---- E L I T E ----
- Posts: 2789
- Joined: Sat Jun 11, 2011 6:07 am
- Location: Nova Hollandia
- Contact:
Re: Weapons safety toggle and ECM
https://wiki.alioth.net/index.php/Oolit ... emsToggled
Describes the related JS event thus:
The weaponsSystemsToggled handler is called whenever the player toggles their weapons systems on or off. The state parameter contains the new state of the weapons systems
this.weaponsSystemsToggled = function(state : boolean)
{
// Your code here
}
The parameter passed is not, however, truly a Boolean value, it contains a number 0 or 1, rather than true or false. player.ship.weaponsOnline , however, does contain a value of true or false. I imagine this was deliberate, as using 0 or 1 allows the possibility of detail being added in future, e.g. 1 = lasers online, 2 = lasers and missiles online, etc. all of which pass as true-ish in JS.
On the off chance it wasn't deliberate, I mention it now.
Describes the related JS event thus:
The weaponsSystemsToggled handler is called whenever the player toggles their weapons systems on or off. The state parameter contains the new state of the weapons systems
this.weaponsSystemsToggled = function(state : boolean)
{
// Your code here
}
The parameter passed is not, however, truly a Boolean value, it contains a number 0 or 1, rather than true or false. player.ship.weaponsOnline , however, does contain a value of true or false. I imagine this was deliberate, as using 0 or 1 allows the possibility of detail being added in future, e.g. 1 = lasers online, 2 = lasers and missiles online, etc. all of which pass as true-ish in JS.
On the off chance it wasn't deliberate, I mention it now.
"Must keep this response efficient to preserve remaining context."
Re: Weapons safety toggle and ECM
Question - can you have both Oolite 1.90 and 1.91 on the same machine (on Windows) or will they interfere with each other?
Also, are 1.90 saves transferrable to 1.91?
Also, are 1.90 saves transferrable to 1.91?
- phkb
- Impressively Grand Sub-Admiral
- Posts: 5232
- Joined: Tue Jan 21, 2014 10:37 pm
- Location: Writing more OXPs, because the world needs more OXPs.
Re: Weapons safety toggle and ECM
Yes to both. As long as you don't install them in the same folder, you can have as many installations of Oolite as you like. They will each have their own AddOns and ManagedAddOns folders.
You can certainly transfer a 1.90 save to 1.91. Not sure about going the other way though - haven't tried that one.