I found code retrieving it with EquipmentInfo.inforForKey() in EscortDeck OXP (in the AI accessory functions to recover the weapon's range and see if the escort should try to snipe) and Ship Configuration OXP.
I tried retrieving it in the Debug Console and weapons_info isn't defined in the EquipmentInfo object returned:
Code: Select all
> var e=EquipmentInfo.infoForKey("EQ_WEAPON_MILITARY_LASER"); e
[EquipmentInfo EQ_WEAPON_MILITARY_LASER "Lance & Ferman LF90 Military Laser"]
> var e=EquipmentInfo.infoForKey("EQ_WEAPON_MILITARY_LASER"); e.name
Lance & Ferman LF90 Military Laser
> var e=EquipmentInfo.infoForKey("EQ_WEAPON_MILITARY_LASER"); e.weapon_info
<nothing>
> var e=EquipmentInfo.infoForKey("EQ_WEAPON_MILITARY_LASER"); e.weapon_info.range
Exception: TypeError: e.weapon_info is undefined
Active script: oolite-debug-console 1.89
oolite-debug-console.js, line 844:
}