mirror of
https://gitea.wildfiregames.com/0ad/0ad
synced 2026-07-04 05:55:47 -07:00
parent
549c0ee1b4
commit
2dc41277df
3 changed files with 6 additions and 5 deletions
|
|
@ -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;
|
||||
};
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
|
|||
|
|
@ -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
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in a new issue