Ticket #2021: alarm_technology.patch

File alarm_technology.patch, 2.4 KB (added by Marcos Paulo Moreti, 11 years ago)
  • binaries/data/mods/public/gui/session/messages.js

     
    6666        if (isDiplomacyOpen)
    6767            openDiplomacy();
    6868    }
     69    else if (notification.type == "technologyResearched")
     70    {
     71        if (notification.player == Engine.GetPlayerID())
     72            Engine.PlayUISound(notification.sound, false);
     73    }
    6974    else if (notification.type == "diplomacy")
    7075    {
    7176        addChatMessage({
  • binaries/data/mods/public/simulation/components/ProductionQueue.js

     
    637637            var cmpTechnologyManager = QueryOwnerInterface(this.entity, IID_TechnologyManager);
    638638            cmpTechnologyManager.ResearchTechnology(item.technologyTemplate);
    639639           
     640            var sound = "audio/interface/alarm/alarmupgradearmory_1.ogg";
     641            var template = cmpTechnologyManager.GetTechnologyTemplate(item.technologyTemplate);
     642           
     643            if (template && template.soundComplete)
     644                sound = template.soundComplete;
     645           
     646            var notification = {"type": "technologyResearched", "player": cmpPlayer.GetPlayerID(), "sound": sound};
     647            var cmpGUIInterface = Engine.QueryInterface(SYSTEM_ENTITY, IID_GuiInterface);
     648            cmpGUIInterface.PushNotification(notification);
     649           
    640650            time -= item.timeRemaining;
    641651           
    642652            this.queue.shift();
  • binaries/data/mods/public/simulation/data/technologies/phase_town_athen.json

     
    33    "specificName": {
    44        "athen": "Komópolis"
    55    },
     6    "soundComplete": "audio/interface/alarm/alarmattackunit_1.ogg",
    67    "description": "Advances from a bustling town to a veritable metropolis, full of the wonders of modern technology. This is the Athenian city phase, where metal gathering rates are boosted because of the Silver Owls bonus.",
    78    "cost": {"food": 1000, "wood": 1000, "stone": 0, "metal": 0},
    89    "requirements": { "class": "Village", "number": 6 },