Ships can be set to have available_to_all equipment barred

script_info = { "oolite-barred-equipment" = ("EQ_KEY1","EQ_KEY2",...); };
This commit is contained in:
cim 2014-01-19 11:48:35 +00:00
parent 678abb6569
commit c272d8952d

View File

@ -83,6 +83,12 @@ this.allowAwardEquipment = function(equipment, ship, context)
}
}
// OXP hook to allow ships to forbid specific "available to all" equipment
if (ship.scriptInfo["oolite-barred-equipment"] && ship.scriptInfo["oolite-barred-equipment"].indexOf(equipment) != -1)
{
return false;
}
// otherwise allowed
return true;
}