Ticket #4255: upgrade.diff

File upgrade.diff, 4.5 KB (added by fatherbushido, 6 years ago)
  • binaries/data/mods/public/simulation/components/Upgrade.js

    Upgrade.prototype.Schema =  
    5353    "</oneOrMore>";
    5454
    5555Upgrade.prototype.Init = function()
    5656{
    5757    this.upgrading = false;
     58    this.completed = false;
    5859    this.elapsedTime = 0;
    5960    this.timer = undefined;
    6061
    6162    this.upgradeTemplates = {};
    6263
    Upgrade.prototype.Init = function()  
    7374};
    7475
    7576// This will also deal with the "OnDestroy" case.
    7677Upgrade.prototype.OnOwnershipChanged = function(msg)
    7778{
    78     this.CancelUpgrade(msg.from);
     79    if (!this.completed)
     80        this.CancelUpgrade(msg.from);
    7981    if (msg.to !== -1)
    8082        this.owner = msg.to;
    8183};
    8284
    8385Upgrade.prototype.ChangeUpgradedEntityCount = function(amount)
    8486{
    8587    if (!this.IsUpgrading())
    8688        return;
    87    
     89
    8890    let cmpTempMan = Engine.QueryInterface(SYSTEM_ENTITY, IID_TemplateManager);
    8991    let template = cmpTempMan.GetTemplate(this.upgrading);
    9092
    9193    let category;
    9294    if (template.TrainingRestrictions)
    Upgrade.prototype.UpgradeProgress = func  
    295297        return;
    296298    }
    297299
    298300    this.CancelTimer();
    299301
     302    this.completed = true;
     303
    300304    let newEntity = ChangeEntityTemplate(this.entity, this.upgrading);
    301305
    302306    if (newEntity)
    303307        PlaySound("upgraded", newEntity);
    304308};
  • libraries/source/spidermonkey/lib/mozjs31-ps-debug.lib

    Impossible d'afficher : fichier considéré comme binaire.
    svn:mime-type = application/octet-stream
  • libraries/source/spidermonkey/lib/mozjs31-ps-release.lib

    Modification de propriétés sur libraries/source/spidermonkey/lib/mozjs31-ps-debug.lib
    ___________________________________________________________________
    Deleted: svn:executable
    ## -1 +0,0 ##
    -*
    \ No newline at end of property
    Deleted: svn:mime-type
    ## -1 +0,0 ##
    -application/octet-stream
    \ No newline at end of property
    Impossible d'afficher : fichier considéré comme binaire.
    svn:mime-type = application/octet-stream
  • libraries/source/spidermonkey/lib/mozjs38-ps-debug.lib

    Modification de propriétés sur libraries/source/spidermonkey/lib/mozjs31-ps-release.lib
    ___________________________________________________________________
    Deleted: svn:executable
    ## -1 +0,0 ##
    -*
    \ No newline at end of property
    Deleted: svn:mime-type
    ## -1 +0,0 ##
    -application/octet-stream
    \ No newline at end of property
    Impossible d'afficher : fichier considéré comme binaire.
    svn:mime-type = application/octet-stream
  • libraries/source/spidermonkey/lib/mozjs38-ps-release.lib

    Modification de propriétés sur libraries/source/spidermonkey/lib/mozjs38-ps-debug.lib
    ___________________________________________________________________
    Deleted: svn:mime-type
    ## -1 +0,0 ##
    -application/octet-stream
    \ No newline at end of property
    Impossible d'afficher : fichier considéré comme binaire.
    svn:mime-type = application/octet-stream