1
1
forked from 0ad/0ad

Mirage unrepairable in cmpRepairable.

e0800bc092 introduced a `repairable` toggle, but did not mirage that
function, meaning one could not repair an allied miraged structure.

Reported by: Langbart
Patch by: Freagarach
Refs #6226

Differential Revision: https://code.wildfiregames.com/D4171
This was SVN commit r25799.
This commit is contained in:
wraitii 2021-06-15 08:46:14 +00:00
parent 6f49e7bd6b
commit eafa7fc005

View File

@ -176,10 +176,13 @@ RepairableMirage.prototype.Init = function(cmpRepairable)
{
this.numBuilders = cmpRepairable.GetNumBuilders();
this.buildTime = cmpRepairable.GetBuildTime();
if (cmpRepairable.unrepairable)
this.unrepairable = cmpRepairable.unrepairable;
};
RepairableMirage.prototype.GetNumBuilders = function() { return this.numBuilders; };
RepairableMirage.prototype.GetBuildTime = function() { return this.buildTime; };
RepairableMirage.prototype.IsRepairable = function() { return !this.unrepairable; };
Engine.RegisterGlobal("RepairableMirage", RepairableMirage);