cleanup 9daa7520ef following bb's comments

This was SVN commit r20763.
This commit is contained in:
mimo 2018-01-03 15:27:02 +00:00
parent 549c0ee1b4
commit 2dc41277df
3 changed files with 6 additions and 5 deletions

View file

@ -31,7 +31,8 @@ Trigger.prototype.eventNames =
Trigger.prototype.Init = function()
{
// Difficulty used by trigger scripts (as defined in data/settings/trigger_difficulties.json).
this.difficulty = 3;
this.difficulty = undefined;
this.triggerPoints = {};
// Each event has its own set of actions determined by the map maker.
@ -335,7 +336,7 @@ Trigger.prototype.DoAction = function(msg)
/**
* Level of difficulty used by trigger scripts.
*/
Trigger.prototype.GetDifficulty = function(diff)
Trigger.prototype.GetDifficulty = function()
{
return this.difficulty;
};

View file

@ -5,7 +5,7 @@
{
"Difficulty": 1,
"Name": "Very Easy",
"Tooltip": "Choose this difficulty if you are discovering 0 A.D.."
"Tooltip": "Choose this difficulty if you are discovering 0 A.D."
},
{
"Difficulty": 2,
@ -15,7 +15,7 @@
{
"Difficulty": 3,
"Name": "Medium",
"Tooltip": "Choose this difficulty if you have already a good experience with 0 A.D.."
"Tooltip": "Choose this difficulty if you have already a good experience with 0 A.D."
},
{
"Difficulty": 4,

View file

@ -43,7 +43,7 @@ function LoadMapSettings(settings)
cmpObstructionManager.SetPassabilityCircular(true);
}
if (settings.TriggerDifficulty)
if (settings.TriggerDifficulty != undefined)
Engine.QueryInterface(SYSTEM_ENTITY, IID_Trigger).SetDifficulty(settings.TriggerDifficulty);
else if (settings.SupportedTriggerDifficulties) // used by Atlas and autostart games
{