scripts awarding equipments with high TL
Posted: Mon Sep 07, 2020 11:44 pm
EquipmentInfo.techLevel has, as per the wiki, "The raw tech level required to purchase this item" (emphasis mine).
When Ship Storage Helper OXP is restoring a ship and tries to award an equipment with higher EquipmentInfo.techLevel than the currents system's, the awardEquipment fails. It then changes the system's tech level to a higher value so the awardEquipment succeeds, but that is a costly change, I've seen it taking 0.5s going up and 0.1s going down.
Since the wiki says that techLevel limitation is for purchasing, and scripts can get around it anyway, if costly, wouldn't it be better to not check tech level on awardEquipment?
When Ship Storage Helper OXP is restoring a ship and tries to award an equipment with higher EquipmentInfo.techLevel than the currents system's, the awardEquipment fails. It then changes the system's tech level to a higher value so the awardEquipment succeeds, but that is a costly change, I've seen it taking 0.5s going up and 0.1s going down.
Since the wiki says that techLevel limitation is for purchasing, and scripts can get around it anyway, if costly, wouldn't it be better to not check tech level on awardEquipment?