weapon_info

For test results, bug reports, announcements of new builds etc.

Moderators: winston, another_commander, Getafix

Post Reply
dybal
---- E L I T E ----
---- E L I T E ----
Posts: 499
Joined: Mon Feb 10, 2020 12:47 pm

weapon_info

Post by dybal »

The wiki shows a dictionary called weapon_info, defined in equipment.plist, with weapons parameters like range, damage, recharge_rate. etc.

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:
    	}
Was it available in past versions, or the code in those OXPs are too optimistic?
Post Reply