mirror of
https://gitea.wildfiregames.com/0ad/0ad.git
synced 2026-06-21 02:46:49 +00:00
Enable sound notifications with technology upgrades. Based on patch by mpmoreti. Fixes #2021
This was SVN commit r13814.
This commit is contained in:
@@ -1,11 +1,13 @@
|
||||
<?xml version="1.0" encoding="utf-8" standalone="no" ?>
|
||||
<SoundGroup>
|
||||
<Gain>1</Gain>
|
||||
<Pitch>1</Pitch>
|
||||
<Priority>100</Priority>
|
||||
<ConeGain>1</ConeGain>
|
||||
<ConeInner>360</ConeInner>
|
||||
<ConeOuter>360</ConeOuter>
|
||||
<?xml version="1.0" encoding="utf-8" standalone="no" ?>
|
||||
<SoundGroup>
|
||||
<Omnipresent>1</Omnipresent>
|
||||
<HeardBy>owner</HeardBy>
|
||||
<Gain>1</Gain>
|
||||
<Pitch>1</Pitch>
|
||||
<Priority>100</Priority>
|
||||
<ConeGain>1</ConeGain>
|
||||
<ConeInner>360</ConeInner>
|
||||
<ConeOuter>360</ConeOuter>
|
||||
<Looping>0</Looping>
|
||||
<RandOrder>1</RandOrder>
|
||||
<RandGain>1</RandGain>
|
||||
|
||||
@@ -637,6 +637,16 @@ ProductionQueue.prototype.ProgressTimeout = function(data)
|
||||
var cmpTechnologyManager = QueryOwnerInterface(this.entity, IID_TechnologyManager);
|
||||
cmpTechnologyManager.ResearchTechnology(item.technologyTemplate);
|
||||
|
||||
var template = cmpTechnologyManager.GetTechnologyTemplate(item.technologyTemplate);
|
||||
|
||||
if (template && template.soundComplete)
|
||||
{
|
||||
var cmpSoundManager = Engine.QueryInterface(SYSTEM_ENTITY, IID_SoundManager);
|
||||
|
||||
if (cmpSoundManager)
|
||||
cmpSoundManager.PlaySoundGroup(template.soundComplete, this.entity);
|
||||
}
|
||||
|
||||
time -= item.timeRemaining;
|
||||
|
||||
this.queue.shift();
|
||||
|
||||
@@ -3,5 +3,6 @@
|
||||
"requirements": { "any": [{"tech":"phase_city_generic"}, {"tech":"phase_city_spart"}, {"tech":"phase_city_britons"}, {"tech":"city_phase_gauls"}, {"tech":"phase_city_pair_celts"}, {"tech":"phase_city_athen"}]},
|
||||
"autoResearch": true,
|
||||
"modifications": [{"value": "TerritoryInfluence/Radius", "multiplier": 1.50}],
|
||||
"affects": ["CivCentre"]
|
||||
"affects": ["CivCentre"],
|
||||
"soundComplete": "interface/alarm/alarm_techcomplete.xml"
|
||||
}
|
||||
|
||||
@@ -12,5 +12,6 @@
|
||||
"researchTime": 80,
|
||||
"tooltip": "Advance to City Phase, which unlocks more structures and units. Territory radius for Civilisation Centres increased by another +50%. Silver Owls civ bonus grants an extra +10% metal gather rate to all workers.",
|
||||
"modifications": [{"value": "ResourceGatherer/Rates/metal.ore", "multiplier": 1.1}],
|
||||
"affects": ["Worker"]
|
||||
}
|
||||
"affects": ["Worker"],
|
||||
"soundComplete": "interface/alarm/alarm_techcomplete.xml"
|
||||
}
|
||||
|
||||
@@ -6,5 +6,6 @@
|
||||
"requirementsTooltip": "Requires 4 new Town Phase structures (except Walls and Civ Centres).",
|
||||
"icon": "city_phase.png",
|
||||
"researchTime": 80,
|
||||
"tooltip": "Advance to City Phase, which unlocks Brythonic structures and units. Territory radius for Civilisation Centres increased by another +50%"
|
||||
"tooltip": "Advance to City Phase, which unlocks Brythonic structures and units. Territory radius for Civilisation Centres increased by another +50%",
|
||||
"soundComplete": "interface/alarm/alarm_techcomplete.xml"
|
||||
}
|
||||
|
||||
@@ -6,5 +6,6 @@
|
||||
"requirementsTooltip": "Requires 4 new Town Phase structures (except Walls and Civ Centres).",
|
||||
"icon": "city_phase.png",
|
||||
"researchTime": 80,
|
||||
"tooltip": "Advance to City Phase, which unlocks Gallic structures and units. Territory radius for Civilisation Centres increased by another +50%"
|
||||
"tooltip": "Advance to City Phase, which unlocks Gallic structures and units. Territory radius for Civilisation Centres increased by another +50%",
|
||||
"soundComplete": "interface/alarm/alarm_techcomplete.xml"
|
||||
}
|
||||
|
||||
@@ -13,5 +13,6 @@
|
||||
"supersedes": "phase_town_generic",
|
||||
"icon": "city_phase.png",
|
||||
"researchTime": 80,
|
||||
"tooltip": "Advance to City Phase, which unlocks more structures and units. Territory radius for Civilisation Centres increased by another +50%"
|
||||
"tooltip": "Advance to City Phase, which unlocks more structures and units. Territory radius for Civilisation Centres increased by another +50%",
|
||||
"soundComplete": "interface/alarm/alarm_techcomplete.xml"
|
||||
}
|
||||
|
||||
@@ -14,5 +14,6 @@
|
||||
"modifications": [
|
||||
{"value": "Promotion/RequiredXp", "multiplier": 0.1, "affects": ["CitizenSoldier"]},
|
||||
{"value": "Player/MaxPopulation", "multiplier": 0.9}
|
||||
]
|
||||
}
|
||||
],
|
||||
"soundComplete": "interface/alarm/alarm_techcomplete.xml"
|
||||
}
|
||||
|
||||
@@ -3,5 +3,6 @@
|
||||
"requirements": { "any": [{"tech":"phase_town_generic"}, {"tech":"phase_town_athen"}]},
|
||||
"autoResearch": true,
|
||||
"modifications": [{"value": "TerritoryInfluence/Radius", "multiplier": 1.30}],
|
||||
"affects": ["CivCentre"]
|
||||
"affects": ["CivCentre"],
|
||||
"soundComplete": "interface/alarm/alarm_techcomplete.xml"
|
||||
}
|
||||
|
||||
@@ -12,5 +12,6 @@
|
||||
"researchTime": 80,
|
||||
"tooltip": "Advance to Town Phase, which unlocks more structures and units. Territory radius for Civilization Centers increased by +30%. 'Silver Owls' civ bonus grants an extra +10% metal gather rate to all workers.",
|
||||
"modifications": [{"value": "ResourceGatherer/Rates/metal.ore", "multiplier": 1.1}],
|
||||
"affects": ["Worker"]
|
||||
}
|
||||
"affects": ["Worker"],
|
||||
"soundComplete": "interface/alarm/alarm_techcomplete.xml"
|
||||
}
|
||||
|
||||
@@ -7,5 +7,6 @@
|
||||
"supersedes": "phase_village",
|
||||
"icon": "town_phase.png",
|
||||
"researchTime": 80,
|
||||
"tooltip": "Advance to Town Phase, which unlocks more structures and units. Territory radius for Civilization Centers increased by +30%"
|
||||
"tooltip": "Advance to Town Phase, which unlocks more structures and units. Territory radius for Civilization Centers increased by +30%",
|
||||
"soundComplete": "interface/alarm/alarm_techcomplete.xml"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user