Page 1 of 1
Weapons safety toggle and ECM
Posted: Wed Jul 02, 2025 8:36 pm
by Bicorn
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.
Re: Weapons safety toggle and ECM
Posted: Thu Jul 03, 2025 6:35 am
by another_commander
Makes sense. I'll make the change shortly and you should be able to test a binary containing it later today.
Re: Weapons safety toggle and ECM
Posted: Thu Jul 03, 2025 7:13 am
by another_commander
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.
Re: Weapons safety toggle and ECM
Posted: Thu Jul 03, 2025 8:19 am
by Wildeblood
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.
Re: Weapons safety toggle and ECM
Posted: Thu Jul 03, 2025 9:35 pm
by Bicorn
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?
Re: Weapons safety toggle and ECM
Posted: Thu Jul 03, 2025 9:58 pm
by phkb
Bicorn wrote: ↑Thu Jul 03, 2025 9:35 pm
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?
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.