1
0
forked from 0ad/0ad

Fix Athenian Long Walls technology following 70c71bff0f.

70c71bff0f changed modifiers to explicitly support only string or
numeric values.
However, buildRestrictions territories worked with a list, which errored
out. This is now replaced with a string.

Reported by: Asger
Investigated by: Freagarach.
Reviewed By: Freagarach
Fixes #5849

Differential Revision: https://code.wildfiregames.com/D3062
This was SVN commit r24135.
This commit is contained in:
wraitii 2020-11-06 08:14:54 +00:00
parent c3843d018f
commit 429d190fd2
2 changed files with 2 additions and 3 deletions

View File

@ -49,7 +49,6 @@ BuildRestrictions.prototype.Schema =
BuildRestrictions.prototype.Init = function()
{
this.territories = this.template.Territory.split(/\s+/);
};
/**
@ -306,7 +305,7 @@ BuildRestrictions.prototype.GetCategory = function()
BuildRestrictions.prototype.GetTerritories = function()
{
return ApplyValueModificationsToEntity("BuildRestrictions/Territory", this.territories, this.entity);
return ApplyValueModificationsToEntity("BuildRestrictions/Territory", this.template.Territory, this.entity).split(/\s+/);
};
BuildRestrictions.prototype.HasTerritory = function(territory)

View File

@ -13,7 +13,7 @@
"researchTime": 60,
"tooltip": "Build Walls in own or neutral territory.",
"modifications": [
{ "value": "BuildRestrictions/Territory", "replace": ["own", "neutral"] }
{ "value": "BuildRestrictions/Territory", "replace": "own neutral" }
],
"affects": ["Wall"],
"soundComplete": "interface/alarm/alarm_upgradearmory.xml"