Copio todo el código para que se entienda.
Para probarlo simplemente se puede poner MaxDistance en un edificio y al colocarlo tira un warning.
if (this.template.Distance.MaxDistance)
{
var dist = +this.template.Distance.MaxDistance;
var nearEnts = cmpRangeManager.ExecuteQuery(this.entity, 0, dist, [cmpPlayer.GetPlayerID()], IID_BuildRestrictions).filter(filter);
if (!nearEnts.length)
{
var result = markForPluralTranslation(
"%(name)s too far from a %(category)s, must be within %(distance)s meter",
"%(name)s too far from a %(category)s, must be within %(distance)s meters",
+this.template.Distance.MinDistance); // <---- This line
result.success = false;
result.translateMessage = true;
result.parameters = {
"name": name,
"category": cat,
"distance": this.template.Distance.MaxDistance
};
result.translateParameters = ["name", "category"];
return result; // Fail
}
}