UK_Eliter wrote:Hi there
Missiles I have installed:
- military missile;
- the missiles from Missiles and Bombs;
- the missiles from Armoury OXP;
- the missiles from Aquatics;
- navel torpedo
(and whatever OXP gives the Thargoids projectiles - but I don't think that one is the cause, given the scenarios I have tested in).
I think it might be the script for my Fer-de-Lance 3G ships that are causing the problem. I don't know.
Oolite version: 1.75.3 beta.
PS: Here are some of the error messages from the log.
Code: Select all
01:29:36.234 [script.javaScript.warning.ooliteDefinedError]: ----- JavaScript warning (Missile Spoof 1.01 - for Oolite 1.75): Ship [PlayerShip "Fer-de-Lance 3G+" position: (58662.7, -76993.1, 590752) scanClass: CLASS_PLAYER status: STATUS_IN_FLIGHT] was requested to fire ECM burst but does not carry ECM equipment.
01:29:36.234 [script.javaScript.warning.ooliteDefinedError]: ../AddOns/missile_spoof.oxp/Scripts/missile-spoof.js, line 12.
Code: Select all
01:30:20.625 [script.javaScript.warning.ooliteDefinedError]: ----- JavaScript warning (Missile Spoof 1.01 - for Oolite 1.75): Ship [PlayerShip "Fer-de-Lance 3G+" position: (60406.8, -80806.7, 578269) scanClass: CLASS_PLAYER status: STATUS_IN_FLIGHT] was requested to fire ECM burst but does not carry ECM equipment.
01:30:20.625 [script.javaScript.warning.ooliteDefinedError]: ../AddOns/missile_spoof.oxp/Scripts/missile-spoof.js, line 12.
Uhhh....UK_Eliter, let me guess, you don't have an ECM, right?
Cmdr Wyvern, I've posted the modified script with changes below that should work as I think that your script is trying to fire the player's ecm when it doesn't have one. This can be prevented with a check to see if the equipment is there just prior to firing.
this.shipAttackedWithMissile = function(missile, whom)
{
if(player.ship.fuel < 0.1 && player.ship.equipmentStatus("EQ_MISSILE_SPOOF") == "EQUIPMENT_OK")
{
if((player.ship.equipmentStatus("EQ_ECM") == "EQUIPMENT_OK"))
{
player.ship.fireECM();
}
player.consoleMessage("Fuel exausted. Cannot produce flares.",5);
}
else if(player.ship.fuel > 0.0 && player.ship.equipmentStatus("EQ_MISSILE_SPOOF") == "EQUIPMENT_OK")
{
if((player.ship.equipmentStatus("EQ_ECM") == "EQUIPMENT_OK"))
{
player.ship.fireECM();
}
player.ship.fuel -= 0.1;
system.legacy_addShipsWithinRadius("spoof_flare_package", 1, "abs", player.ship.position.subtract(player.ship.orientation.vectorUp().multiply(20)), 10);
}
}
If I understand things correctly that should take care of the problem for both of you. Cheers!