if (player.hasEquipment('EQ_WEAPON_MILITARY_LASER')) {
//ooh nice!
....
}
but it returns false whether I've got the military laser or not.
I looked at the wiki, and the twin plasma lasers are are the only lasers that can be tested for. Is there a way in javascript to find out if we've got any of the other lasers equipped anywhere on board?
Hmmm, I tried to see if I could figure out the type of laser depending on weaponRange but, at least in 1.70 vanilla, it's always0 if you've got military, pulse, and beam lasers installed...
but it returns false whether I've got the military laser or not
When you look in the save file you'll figure out why it is not working. Missiles an weapons are stored differently and in an other array. I think this also didn't work in the old system.
Shame, it would really help to know the lasers equipped, so we can scale the challenge up & down accordingly.
I ended up using the player's score. Unlikely someone manages 60 odd kills with a pulse laser & a toothpick!
In general it is the player responsibility to make sure he has the right stuff for a fight. It shouldn't be the opponents that adapt to the players outfit.