Ticket #2353: work_orders_under_alert.patch

File work_orders_under_alert.patch, 818 bytes (added by Itms, 10 years ago)
  • binaries/data/mods/public/simulation/components/UnitAI.js

     
    35703570
    35713571UnitAI.prototype.UpdateWorkOrders = function(type)
    35723572{
     3573    // Under alert, remembered work orders won't be forgotten
     3574    if (this.IsUnderAlert())
     3575        return;
     3576   
    35733577    var isWorkType = function(type){
    35743578        return (type == "Gather" || type == "Trade" || type == "Repair" || type == "ReturnResource");
    35753579    };
    35763580   
    3577     // If we are being reaffected to a work order, forgot the previous ones
     3581    // If we are being re-affected to a work order, forget the previous ones
    35783582    if (isWorkType(type))
    35793583    {
    35803584        this.workOrders = [];