Code: Select all
Oolite [Eric's test] OOJSGlobal.m:165: Damaged: EQ_UPS_UNIVERSAL_SCANNER With name: Universal Scanner
Oolite [Eric's test] OOJSGlobal.m:165: Damaged: EQ_ENERGY_BOMB With name: Energy Bomb
Oolite [Eric's test] OOJSGlobal.m:165: Damaged: EQ_FUEL_INJECTION With name: Witchdrive Fuel Injectors
Looking in the code I cant see how total equipment destruction is possible. Playing Oolite in strict mode destroys equipment, otherwise it only damages when I read the code well. I don't know what caused this complete deletion of the equipment but somehow I liked this bug. It gives more variation in destruction. Why not make it a feature that equipment can be damaged AND destroyed by changing the code in playerEntity.m into:
[self removeEquipmentItem:system_key];
if (![UNIVERSE strict] && ranrot_rand() & 255 < 200)
{
[self addEquipmentItem:[NSString stringWithFormat:@"%@_DAMAGED", system_key]]; // for possible future repair
[self doScriptEvent:@"equipmentDamaged" withArgument:system_key];
if (![self hasEquipmentItem:system_name]) // Because script may have undestroyed it
{
[UNIVERSE addMessage:[NSString stringWithFormat:DESC(@"@-damaged"), system_name] forCount:4.5];
}
}
else
{
[self doScriptEvent:@"equipmentDestroyed" withArgument:system_key];
if (![self hasEquipmentItem:system_name]) // Because script may have undestroyed it
{
[UNIVERSE addMessage:[NSString stringWithFormat:DESC(@"@-destroyed"), system_name] forCount:4.5];
}
}