Ticket #3102: survival.patch

File survival.patch, 1.8 KB (added by mimo, 3 years ago)
  • binaries/data/mods/public/maps/random/survivalofthefittest_triggers.js

     
    44    "structures/" + civ + "_farmstead",
    55    "structures/" + civ + "_field",
    66    "structures/" + civ + "_storehouse",
    7     "structures/brit_rotarymill",
     7    "structures/" + civ + "_rotarymill",
    88    "units/maur_support_elephant",
    99
    1010    // Expansions
     
    158158    this.DoAfterDelay(nextTime, "StartAnEnemyWave", {}); // The next wave will come in 3 minutes
    159159};
    160160
    161 Trigger.prototype.InitGame = function()
     161Trigger.prototype.OnGlobalInitGame = function()
    162162{
    163163    let numberOfPlayers = TriggerHelper.GetNumberOfPlayers();
    164164    // Find all of the civic centers, disable some structures
     
    225225{
    226226    let cmpTrigger = Engine.QueryInterface(SYSTEM_ENTITY, IID_Trigger);
    227227    cmpTrigger.playerCivicCenter = {};
    228     cmpTrigger.DoAfterDelay(0, "InitGame", {});
    229228    cmpTrigger.DoAfterDelay(1000, "InitializeEnemyWaves", {});
    230229    cmpTrigger.RegisterTrigger("OnOwnershipChanged", "DefeatPlayerOnceCCIsDestroyed", { "enabled": true });
    231230}
  • binaries/data/mods/public/simulation/components/Trigger.js

     
    265265    this.CallEvent("PlayerWon", msg);
    266266};
    267267
     268/** dummy function to be implemented in the trigger map part if needed */
     269Trigger.prototype.OnGlobalInitGame = function(msg)
     270{
     271};
     272
    268273/**
    269274 * Execute a function after a certain delay.
    270275 *