Add error to TechMan. when trying to finish a non-existing technology (e.g. wrong allied_view tech defined).
This was SVN commit r27935.
This commit is contained in:
parent
a90a3a7e48
commit
0dcaefc2f6
@ -90,6 +90,9 @@ TechnologyManager.prototype.Technology.prototype.Finish = function()
|
||||
this.finished = true;
|
||||
|
||||
const template = TechnologyTemplates.Get(this.templateName);
|
||||
if (!template)
|
||||
error("Trying to finish non-existing technology: " + this.templateName + ".")
|
||||
|
||||
if (template.soundComplete)
|
||||
Engine.QueryInterface(SYSTEM_ENTITY, IID_SoundManager)?.PlaySoundGroup(template.soundComplete, this.researcher);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user