Extract translation strings.
This commit is contained in:
committed by
abcdefg30
parent
640e9d68b7
commit
5032b2b872
@@ -7,6 +7,26 @@
|
||||
information, see COPYING.
|
||||
]]
|
||||
|
||||
---Adds a new mandatory objective, translates it and announces it via in-game chat message.
|
||||
---@param player player recipient of the objective
|
||||
---@param description string key of the translation string
|
||||
---@return number id used to query for the objective later
|
||||
AddPrimaryObjective = function(player, description)
|
||||
local translation = UserInterface.Translate(description)
|
||||
Media.DisplayMessageToPlayer(player, translation, UserInterface.Translate("new-primary-objective"))
|
||||
return player.AddObjective(translation, UserInterface.Translate("primary"), true)
|
||||
end
|
||||
|
||||
---Adds a new optional objective, translates it and announces it via in-game chat message.
|
||||
---@param player player recipient of the objective
|
||||
---@param description string key of the translation string
|
||||
---@return number id used to query for the objective later
|
||||
AddSecondaryObjective = function(player, description)
|
||||
local translation = UserInterface.Translate(description)
|
||||
Media.DisplayMessageToPlayer(player, translation, UserInterface.Translate("new-secondary-objective"))
|
||||
return player.AddObjective(translation, UserInterface.Translate("secondary"), false)
|
||||
end
|
||||
|
||||
IdleHunt = function(actor)
|
||||
if actor.HasProperty("Hunt") and not actor.IsDead then
|
||||
Trigger.OnIdle(actor, actor.Hunt)
|
||||
|
||||
155
mods/d2k/languages/lua/en.ftl
Normal file
155
mods/d2k/languages/lua/en.ftl
Normal file
@@ -0,0 +1,155 @@
|
||||
## campaign.lua
|
||||
objective-failed = Objective failed
|
||||
objective-completed = Objective completed
|
||||
|
||||
primary = Primary
|
||||
secondary = Secondary
|
||||
|
||||
new-primary-objective = New primary objective
|
||||
new-secondary-objective = New secondary objectives
|
||||
|
||||
mentat = Mentat
|
||||
|
||||
## atreides-01ab, atreides03ab, harkonnen-01a, ordos-05
|
||||
harvested-resources = Harvested resources: { $harvested }/{ $goal }
|
||||
harvest-spice = Harvest { $spice } Solaris worth of Spice.
|
||||
not-enough-silos = We don't have enough silo space to store the required amount of Spice!
|
||||
|
||||
## atreides-01ab, harkonnen-01ab, ordos01ab
|
||||
build-concrete = Build a concrete foundation before placing your buildings.
|
||||
build-windtrap = Build a Wind Trap for power.
|
||||
build-refinery = Build a Refinery to collect Spice.
|
||||
build-silo = Build a Silo to store additional Spice.
|
||||
|
||||
## atreides-01ab, ordos01a, ordos-03ab
|
||||
eliminate-harkonnen-units-reinforcements = Eliminate all Harkonnen units and reinforcements
|
||||
in the area.
|
||||
|
||||
## atreides-02a, atreides-04, atreides-05, ordos-02ab, ordos-03ab, ordos-04, ordos-06a
|
||||
harkonnen-annihilated = The Harkonnen have been annihilated!
|
||||
|
||||
## atreides-02a, ordos02ab
|
||||
destroy-harkonnen-forces = Destroy all Harkonnen forces.
|
||||
|
||||
## atreides-02b, atreides-03b, harkonnen-05, harkonnen-06ab, harkonnen-08
|
||||
ordos-annihilated = The Ordos have been annihilated!
|
||||
|
||||
## atreides-02b, atreides-03b, harkonnen-03ab, ordos-03a
|
||||
upgrade-barracks-light-factory = Upgrade Barracks and Light Factory to produce more advanced units.
|
||||
|
||||
## atreides-02b
|
||||
eliminate-ordos-units-reinforcements = Eliminate all Ordos units and reinforcements
|
||||
in the area.
|
||||
|
||||
## atreides-04, ordos-04, ordos-06a
|
||||
destroy-harkonnen = Destroy the Harkonnen.
|
||||
|
||||
## atreides-04
|
||||
sietch-integrity = Sietch structural integrity: { $integrity }%
|
||||
protect-fremen-sietch = Protect the Fremen Sietch.
|
||||
keep-sietch-intact = Keep the Sietch { $integrity }% intact!
|
||||
fremen-sietch-southeast = Fremen Sietch detected to the southeast.
|
||||
sietch-destroyed = Sietch destroyed!
|
||||
fremen-sietch-under-attack = The Fremen Sietch is under attack!
|
||||
|
||||
## atreides-05, harkonnen-06ab, harkonnen09ab
|
||||
smugglers-annihilated = The Smugglers have been annihilated!
|
||||
|
||||
## atreides-05
|
||||
incoming-mercenary-force = Incoming hostile Mercenary force detected.
|
||||
contraband-has-arrived = The contraband has arrived!
|
||||
contraband-confiscated = Contraband has arrived and been confiscated.
|
||||
contraband-not-confiscated = Smuggler contraband has arrived. It is too late to confiscate.
|
||||
contraband-arrives-in = The contraband will arrive in { $time }
|
||||
capture-barracks-sietch-tabr = Capture the Barracks at Sietch Tabr.
|
||||
annihilate-harkonnen-units-reinforcements = Annihilate all other Harkonnen units
|
||||
and reinforcements.
|
||||
capture-smuggler-starport-confiscate-contraband = Capture the Smuggler Starport and
|
||||
confiscate the contraband.
|
||||
contraband-approaching-starport-north-in = The contraband is approaching the Starport to the north in { $time }.
|
||||
starport-destroyed-no-contraband = Starport destroyed! Contraband can't land.
|
||||
do-not-destroy-starport = Don't destroy the Starport!
|
||||
defend-captured-starport = Defend the captured Starport.
|
||||
do-not-destroy-barracks = Don't destroy the Barracks!
|
||||
hostages-released = Hostages released!
|
||||
stay-away-from-starport = Stay away from our Starport.
|
||||
smuggler-leader = Smuggler Leader
|
||||
were-warned-will-pay = You were warned. Now you will pay.
|
||||
destroy-smugglers-mercenaries = Destroy the Smugglers and their Mercenaries.
|
||||
capture-harkonnen-barracks-release-hostages = Capture the Harkonnen barracks to release the hostages.
|
||||
|
||||
## harkonnen-01ab, harkonnen-03ab
|
||||
eliminate-atreides-units-reinforcements = Eliminate all Atreides units and reinforcements
|
||||
in the area.
|
||||
|
||||
## harkonnen-02ab, harkonnen-03ab, harkonnen-04, harkonnen-07, harkonnen-08, harkonnen-09, ordos-05, ordos-06a
|
||||
atreides-annihilated = The Atreides have been annihilated!
|
||||
|
||||
## harkonnen-02ab, harkonnen-03ab, harkonnen-04
|
||||
destroy-atreides-forces = Destroy all Atreides forces.
|
||||
|
||||
## harkonnen-04, harkonnen-07, harkonnen-08, harkonnen-09ab, ordos-05, ordos-06a
|
||||
destroy-atreides = Destroy the Atreides.
|
||||
|
||||
## harkonnen-04
|
||||
fremen-annihilated = The Fremen have been annihilated!
|
||||
destroy-fremen = Destroy the Fremen.
|
||||
fremen-spotted-north-southeast = Fremen concentrations spotted to the north and southwest.
|
||||
|
||||
## harkonnen-05
|
||||
imperial-ships-penetrating-defense-grid = Imperial ships penetrating defense grid!
|
||||
enemy-carryall-drop-detected = Enemy carryall drop detected!
|
||||
keep-modified-outpost-intact = Keep the modified Outpost intact.
|
||||
protect-outpost = Protect the Outpost from attack.
|
||||
|
||||
## harkonnen-05, harkonnen-09ab
|
||||
destroy-imperial-forces = Destroy the Imperial forces.
|
||||
|
||||
## harkonnen-05, harkonnen-07, harkonnen-09ab
|
||||
emperor-annihilated = The Emperor has been annihilated!
|
||||
|
||||
## harkonnen-05, harkonnen-08
|
||||
destroy-ordos = Destroy the Ordos.
|
||||
|
||||
## harkonnen-06ab
|
||||
ixian-transports-detected = Ixian transports detected.
|
||||
capture-destroy-ordos-starport = Capture or destroy the Ordos Starport.
|
||||
|
||||
## harkonnen-06ab, harkonnen-09ab
|
||||
smugglers-now-hostile = The Smugglers are now hostile!
|
||||
|
||||
## harkonnen-07
|
||||
high-tech-factory-neutralized-imperial-reinforcements = High Tech Factory neutralized! Atreides cut off from Imperial reinforcement!
|
||||
capture-atreides-construction-yard-south = Capture the Atreides Construction Yard in the south.
|
||||
destroy-corrino = Destroy the Corrino.
|
||||
destroy-atreides-high-tech-factory-imperial-reinforcements = Destroy Atreides High Tech Factory to cut off Atreides from Imperial reinforcements.
|
||||
|
||||
## harkonnen-08
|
||||
atreides-hostile = The Atreides are now hostile!
|
||||
mercenaries-annihilated = The Mercenaries have been annihilated!
|
||||
ally-mercenaries = Persuade the Mercenaries to fight with
|
||||
House Harkonnen.
|
||||
mercenary-leader-captured-allied = Leader Captured. Mercenaries have been persuaded to fight with House Harkonnen.
|
||||
can-not-stand-harkonnen-must-become-neutral = We cannot stand against the Harkonnen. We must become neutral.
|
||||
atreides-commander = Atreides Commander
|
||||
|
||||
## harkonnen-09ab
|
||||
build-deploy-mcv = Build an MCV and deploy it into a Construction Yard.
|
||||
|
||||
## ordos-01ab, ordos-02ab, ordos-03ab, ordos-04, ordos-05
|
||||
outpost-not-captured-destroyed = Don't let the Outpost to be captured or destroyed.
|
||||
capture-smuggler-outpost = Capture the Smuggler Outpost.
|
||||
do-not-destroy-outpost = Don't destroy the Outpost!
|
||||
warning-large-force-approaching = WARNING: Large force approaching!
|
||||
|
||||
## ordos-05
|
||||
capture-atreides-starport-establish-base = Capture the Atreides Starport and establish a base.
|
||||
|
||||
## ordos-06a
|
||||
ixian-reinforcements-arrived = Ixian reinforcements have arrived!
|
||||
deliveries-arriving-massive-reinforcements = Deliveries beginning to arrive. Massive reinforcements expected!
|
||||
initial-reinforcements-arrive-in = Initial reinforcements will arrive in { $time }
|
||||
additional-reinforcements-arrive-in = Additional reinforcements will arrive in { $time }
|
||||
defend-starport = Defend the Starport.
|
||||
ixian-reinforcements-in = The first batch of Ixian reinforcements will arrive in { $time }.
|
||||
enemy-reinforcements-arrived = Enemy reinforcements have arrived.
|
||||
@@ -53,12 +53,13 @@ AtreidesEntryPath = { AtreidesWaypoint.Location, AtreidesRally.Location }
|
||||
|
||||
Messages =
|
||||
{
|
||||
"Build a concrete foundation before placing your buildings.",
|
||||
"Build a Wind Trap for power.",
|
||||
"Build a Refinery to collect Spice.",
|
||||
"Build a Silo to store additional Spice."
|
||||
UserInterface.Translate("build-concrete"),
|
||||
UserInterface.Translate("build-windtrap"),
|
||||
UserInterface.Translate("build-refinery"),
|
||||
UserInterface.Translate("build-silo")
|
||||
}
|
||||
|
||||
CachedResources = -1
|
||||
Tick = function()
|
||||
if HarkonnenArrived and harkonnen.HasNoRequiredUnits() then
|
||||
player.MarkCompletedObjective(KillHarkonnen)
|
||||
@@ -71,21 +72,26 @@ Tick = function()
|
||||
-- player has no Wind Trap
|
||||
if (player.PowerProvided <= 20 or player.PowerState ~= "Normal") and DateTime.GameTime % DateTime.Seconds(32) == 0 then
|
||||
HasPower = false
|
||||
Media.DisplayMessage(Messages[2], "Mentat")
|
||||
Media.DisplayMessage(Messages[2], Mentat)
|
||||
else
|
||||
HasPower = true
|
||||
end
|
||||
|
||||
-- player has no Refinery and no Silos
|
||||
if HasPower and player.ResourceCapacity == 0 and DateTime.GameTime % DateTime.Seconds(32) == 0 then
|
||||
Media.DisplayMessage(Messages[3], "Mentat")
|
||||
Media.DisplayMessage(Messages[3], Mentat)
|
||||
end
|
||||
|
||||
if HasPower and player.Resources > player.ResourceCapacity * 0.8 and DateTime.GameTime % DateTime.Seconds(32) == 0 then
|
||||
Media.DisplayMessage(Messages[4], "Mentat")
|
||||
Media.DisplayMessage(Messages[4], Mentat)
|
||||
end
|
||||
|
||||
UserInterface.SetMissionText("Harvested resources: " .. player.Resources .. "/" .. SpiceToHarvest, player.Color)
|
||||
if player.Resources ~= CachedResources then
|
||||
local parameters = { ["harvested"] = player.Resources, ["goal"] = SpiceToHarvest }
|
||||
local harvestedResources = UserInterface.Translate("harvested-resources", parameters)
|
||||
UserInterface.SetMissionText(harvestedResources)
|
||||
CachedResources = player.Resources
|
||||
end
|
||||
end
|
||||
|
||||
WorldLoaded = function()
|
||||
@@ -95,14 +101,15 @@ WorldLoaded = function()
|
||||
SpiceToHarvest = ToHarvest[Difficulty]
|
||||
|
||||
InitObjectives(player)
|
||||
KillAtreides = harkonnen.AddPrimaryObjective("Kill all Atreides units.")
|
||||
GatherSpice = player.AddPrimaryObjective("Harvest " .. tostring(SpiceToHarvest) .. " Solaris worth of Spice.")
|
||||
KillHarkonnen = player.AddSecondaryObjective("Eliminate all Harkonnen units and reinforcements\nin the area.")
|
||||
KillAtreides = AddPrimaryObjective(harkonnen, "")
|
||||
local harvestSpice = UserInterface.Translate("harvest-spice", { ["spice"] = SpiceToHarvest })
|
||||
GatherSpice = AddPrimaryObjective(player, harvestSpice)
|
||||
KillHarkonnen = AddSecondaryObjective(player, "eliminate-harkonnen-units-reinforcements")
|
||||
|
||||
local checkResourceCapacity = function()
|
||||
Trigger.AfterDelay(0, function()
|
||||
if player.ResourceCapacity < SpiceToHarvest then
|
||||
Media.DisplayMessage("We don't have enough silo space to store the required amount of Spice!", "Mentat")
|
||||
Media.DisplayMessage(UserInterface.Translate("not-enough-silos"), Mentat)
|
||||
Trigger.AfterDelay(DateTime.Seconds(3), function()
|
||||
harkonnen.MarkCompletedObjective(KillAtreides)
|
||||
end)
|
||||
@@ -133,7 +140,7 @@ WorldLoaded = function()
|
||||
end
|
||||
end)
|
||||
|
||||
Media.DisplayMessage(Messages[1], "Mentat")
|
||||
Media.DisplayMessage(Messages[1], Mentat)
|
||||
|
||||
Trigger.AfterDelay(DateTime.Seconds(25), function()
|
||||
Media.PlaySpeechNotification(player, "Reinforce")
|
||||
|
||||
@@ -113,3 +113,5 @@ Actors:
|
||||
Owner: Neutral
|
||||
|
||||
Rules: d2k|rules/campaign-rules.yaml, d2k|rules/campaign-tooltips.yaml, d2k|rules/campaign-palettes.yaml, rules.yaml
|
||||
|
||||
Translations: d2k|languages/lua/en.ftl
|
||||
|
||||
@@ -53,12 +53,13 @@ AtreidesEntryPath = { AtreidesWaypoint.Location, AtreidesRally.Location }
|
||||
|
||||
Messages =
|
||||
{
|
||||
"Build a concrete foundation before placing your buildings.",
|
||||
"Build a Wind Trap for power.",
|
||||
"Build a Refinery to collect Spice.",
|
||||
"Build a Silo to store additional Spice."
|
||||
UserInterface.Translate("build-concrete"),
|
||||
UserInterface.Translate("build-windtrap"),
|
||||
UserInterface.Translate("build-refinery"),
|
||||
UserInterface.Translate("build-silo")
|
||||
}
|
||||
|
||||
CachedResources = -1
|
||||
Tick = function()
|
||||
if HarkonnenArrived and harkonnen.HasNoRequiredUnits() then
|
||||
player.MarkCompletedObjective(KillHarkonnen)
|
||||
@@ -71,21 +72,26 @@ Tick = function()
|
||||
-- player has no Wind Trap
|
||||
if (player.PowerProvided <= 20 or player.PowerState ~= "Normal") and DateTime.GameTime % DateTime.Seconds(32) == 0 then
|
||||
HasPower = false
|
||||
Media.DisplayMessage(Messages[2], "Mentat")
|
||||
Media.DisplayMessage(Messages[2], Mentat)
|
||||
else
|
||||
HasPower = true
|
||||
end
|
||||
|
||||
-- player has no Refinery and no Silos
|
||||
if HasPower and player.ResourceCapacity == 0 and DateTime.GameTime % DateTime.Seconds(32) == 0 then
|
||||
Media.DisplayMessage(Messages[3], "Mentat")
|
||||
Media.DisplayMessage(Messages[3], Mentat)
|
||||
end
|
||||
|
||||
if HasPower and player.Resources > player.ResourceCapacity * 0.8 and DateTime.GameTime % DateTime.Seconds(32) == 0 then
|
||||
Media.DisplayMessage(Messages[4], "Mentat")
|
||||
Media.DisplayMessage(Messages[4], Mentat)
|
||||
end
|
||||
|
||||
UserInterface.SetMissionText("Harvested resources: " .. player.Resources .. "/" .. SpiceToHarvest, player.Color)
|
||||
if player.Resources ~= CachedResources then
|
||||
local parameters = { ["harvested"] = player.Resources, ["goal"] = SpiceToHarvest }
|
||||
local harvestedResources = UserInterface.Translate("harvested-resources", parameters)
|
||||
UserInterface.SetMissionText(harvestedResources)
|
||||
CachedResources = player.Resources
|
||||
end
|
||||
end
|
||||
|
||||
WorldLoaded = function()
|
||||
@@ -95,14 +101,15 @@ WorldLoaded = function()
|
||||
SpiceToHarvest = ToHarvest[Difficulty]
|
||||
|
||||
InitObjectives(player)
|
||||
KillAtreides = harkonnen.AddPrimaryObjective("Kill all Atreides units.")
|
||||
GatherSpice = player.AddPrimaryObjective("Harvest " .. tostring(SpiceToHarvest) .. " Solaris worth of Spice.")
|
||||
KillHarkonnen = player.AddSecondaryObjective("Eliminate all Harkonnen units and reinforcements\nin the area.")
|
||||
KillAtreides = AddPrimaryObjective(harkonnen, "")
|
||||
local harvestSpice = UserInterface.Translate("harvest-spice", { ["spice"] = SpiceToHarvest })
|
||||
GatherSpice = AddPrimaryObjective(player, harvestSpice)
|
||||
KillHarkonnen = AddSecondaryObjective(player, "eliminate-harkonnen-units-reinforcements")
|
||||
|
||||
local checkResourceCapacity = function()
|
||||
Trigger.AfterDelay(0, function()
|
||||
if player.ResourceCapacity < SpiceToHarvest then
|
||||
Media.DisplayMessage("We don't have enough silo space to store the required amount of Spice!", "Mentat")
|
||||
Media.DisplayMessage(UserInterface.Translate("not-enough-silos"), Mentat)
|
||||
Trigger.AfterDelay(DateTime.Seconds(3), function()
|
||||
harkonnen.MarkCompletedObjective(KillAtreides)
|
||||
end)
|
||||
@@ -133,7 +140,7 @@ WorldLoaded = function()
|
||||
end
|
||||
end)
|
||||
|
||||
Media.DisplayMessage(Messages[1], "Mentat")
|
||||
Media.DisplayMessage(Messages[1], Mentat)
|
||||
|
||||
Trigger.AfterDelay(DateTime.Seconds(25), function()
|
||||
Media.PlaySpeechNotification(player, "Reinforce")
|
||||
|
||||
@@ -112,3 +112,5 @@ Actors:
|
||||
Owner: Neutral
|
||||
|
||||
Rules: d2k|rules/campaign-rules.yaml, d2k|rules/campaign-tooltips.yaml, d2k|rules/campaign-palettes.yaml, rules.yaml
|
||||
|
||||
Translations: d2k|languages/lua/en.ftl
|
||||
|
||||
@@ -70,7 +70,7 @@ Tick = function()
|
||||
end
|
||||
|
||||
if harkonnen.HasNoRequiredUnits() and not player.IsObjectiveCompleted(KillHarkonnen) then
|
||||
Media.DisplayMessage("The Harkonnen have been annihilated!", "Mentat")
|
||||
Media.DisplayMessage(UserInterface.Translate("harkonnen-annihilated"), Mentat)
|
||||
player.MarkCompletedObjective(KillHarkonnen)
|
||||
end
|
||||
end
|
||||
@@ -80,8 +80,8 @@ WorldLoaded = function()
|
||||
player = Player.GetPlayer("Atreides")
|
||||
|
||||
InitObjectives(player)
|
||||
KillAtreides = harkonnen.AddPrimaryObjective("Kill all Atreides units.")
|
||||
KillHarkonnen = player.AddPrimaryObjective("Destroy all Harkonnen forces.")
|
||||
KillAtreides = AddPrimaryObjective(harkonnen, "")
|
||||
KillHarkonnen = AddPrimaryObjective(player, "destroy-harkonnen-forces")
|
||||
|
||||
Camera.Position = AConyard.CenterPosition
|
||||
|
||||
|
||||
@@ -170,3 +170,5 @@ Actors:
|
||||
Location: 30,28
|
||||
|
||||
Rules: d2k|rules/campaign-rules.yaml, d2k|rules/campaign-tooltips.yaml, d2k|rules/campaign-palettes.yaml, rules.yaml
|
||||
|
||||
Translations: d2k|languages/lua/en.ftl
|
||||
|
||||
@@ -70,7 +70,7 @@ Tick = function()
|
||||
end
|
||||
|
||||
if harkonnen.HasNoRequiredUnits() and not player.IsObjectiveCompleted(KillHarkonnen) then
|
||||
Media.DisplayMessage("The Harkonnen have been annihilated!", "Mentat")
|
||||
Media.DisplayMessage(UserInterface.Translate("harkonnen-annihilated"), Mentat)
|
||||
player.MarkCompletedObjective(KillHarkonnen)
|
||||
end
|
||||
end
|
||||
@@ -80,8 +80,8 @@ WorldLoaded = function()
|
||||
player = Player.GetPlayer("Atreides")
|
||||
|
||||
InitObjectives(player)
|
||||
KillAtreides = harkonnen.AddPrimaryObjective("Kill all Atreides units.")
|
||||
KillHarkonnen = player.AddPrimaryObjective("Destroy all Harkonnen forces.")
|
||||
KillAtreides = AddPrimaryObjective(harkonnen, "")
|
||||
KillHarkonnen = AddPrimaryObjective(player, "destroy-harkonnen-forces")
|
||||
|
||||
Camera.Position = AConyard.CenterPosition
|
||||
|
||||
|
||||
@@ -140,3 +140,5 @@ Actors:
|
||||
Location: 30,28
|
||||
|
||||
Rules: d2k|rules/campaign-rules.yaml, d2k|rules/campaign-tooltips.yaml, d2k|rules/campaign-palettes.yaml, rules.yaml
|
||||
|
||||
Translations: d2k|languages/lua/en.ftl
|
||||
|
||||
@@ -81,13 +81,14 @@ MessageCheck = function(index)
|
||||
return #player.GetActorsByType(AtreidesBaseBuildings[index]) > 0 and not player.HasPrerequisites({ AtreidesUpgrades[index] })
|
||||
end
|
||||
|
||||
CachedResources = -1
|
||||
Tick = function()
|
||||
if player.HasNoRequiredUnits() then
|
||||
ordos.MarkCompletedObjective(KillAtreides)
|
||||
end
|
||||
|
||||
if ordos.HasNoRequiredUnits() and not player.IsObjectiveCompleted(KillOrdos) then
|
||||
Media.DisplayMessage("The Ordos have been annihilated!", "Mentat")
|
||||
Media.DisplayMessage(UserInterface.Translate("ordos-annihilated"), Mentat)
|
||||
player.MarkCompletedObjective(KillOrdos)
|
||||
end
|
||||
|
||||
@@ -105,10 +106,15 @@ Tick = function()
|
||||
end
|
||||
|
||||
if DateTime.GameTime % DateTime.Seconds(32) == 0 and (MessageCheck(1) or MessageCheck(2)) then
|
||||
Media.DisplayMessage("Upgrade barracks and light factory to produce more advanced units.", "Mentat")
|
||||
Media.DisplayMessage(UserInterface.Translate("upgrade-barracks-light-factory"), Mentat)
|
||||
end
|
||||
|
||||
UserInterface.SetMissionText("Harvested resources: " .. player.Resources .. "/" .. SpiceToHarvest, player.Color)
|
||||
if player.Resources ~= CachedResources then
|
||||
local parameters = { ["harvested"] = player.Resources, ["goal"] = SpiceToHarvest }
|
||||
local harvestedResources = UserInterface.Translate("harvested-resources", parameters)
|
||||
UserInterface.SetMissionText(harvestedResources)
|
||||
CachedResources = player.Resources
|
||||
end
|
||||
end
|
||||
|
||||
WorldLoaded = function()
|
||||
@@ -118,16 +124,17 @@ WorldLoaded = function()
|
||||
SpiceToHarvest = ToHarvest[Difficulty]
|
||||
|
||||
InitObjectives(player)
|
||||
KillAtreides = ordos.AddPrimaryObjective("Kill all Atreides units.")
|
||||
GatherSpice = player.AddPrimaryObjective("Harvest " .. tostring(SpiceToHarvest) .. " Solaris worth of Spice.")
|
||||
KillOrdos = player.AddSecondaryObjective("Eliminate all Ordos units and reinforcements\nin the area.")
|
||||
KillAtreides = AddPrimaryObjective(ordos, "")
|
||||
local harvestSpice = UserInterface.Translate("harvest-spice", { ["spice"] = SpiceToHarvest })
|
||||
GatherSpice = AddPrimaryObjective(player, harvestSpice)
|
||||
KillOrdos = AddSecondaryObjective(player, "eliminate-ordos-units-reinforcements")
|
||||
|
||||
Camera.Position = AConyard.CenterPosition
|
||||
|
||||
local checkResourceCapacity = function()
|
||||
Trigger.AfterDelay(0, function()
|
||||
if player.ResourceCapacity < SpiceToHarvest then
|
||||
Media.DisplayMessage("We don't have enough silo space to store the required amount of Spice!", "Mentat")
|
||||
Media.DisplayMessage(UserInterface.Translate("not-enough-silos"), Mentat)
|
||||
Trigger.AfterDelay(DateTime.Seconds(3), function()
|
||||
ordos.MarkCompletedObjective(KillAtreides)
|
||||
end)
|
||||
|
||||
@@ -137,3 +137,5 @@ Actors:
|
||||
Location: 39,30
|
||||
|
||||
Rules: d2k|rules/campaign-rules.yaml, d2k|rules/campaign-tooltips.yaml, d2k|rules/campaign-palettes.yaml, rules.yaml
|
||||
|
||||
Translations: d2k|languages/lua/en.ftl
|
||||
|
||||
@@ -81,13 +81,14 @@ MessageCheck = function(index)
|
||||
return #player.GetActorsByType(AtreidesBaseBuildings[index]) > 0 and not player.HasPrerequisites({ AtreidesUpgrades[index] })
|
||||
end
|
||||
|
||||
CachedResources = -1
|
||||
Tick = function()
|
||||
if player.HasNoRequiredUnits() then
|
||||
ordos.MarkCompletedObjective(KillAtreides)
|
||||
end
|
||||
|
||||
if ordos.HasNoRequiredUnits() and not player.IsObjectiveCompleted(KillOrdos) then
|
||||
Media.DisplayMessage("The Ordos have been annihilated!", "Mentat")
|
||||
Media.DisplayMessage(UserInterface.Translate("ordos-annihilated"), Mentat)
|
||||
player.MarkCompletedObjective(KillOrdos)
|
||||
end
|
||||
|
||||
@@ -105,10 +106,15 @@ Tick = function()
|
||||
end
|
||||
|
||||
if DateTime.GameTime % DateTime.Seconds(32) == 0 and (MessageCheck(1) or MessageCheck(2)) then
|
||||
Media.DisplayMessage("Upgrade barracks and light factory to produce more advanced units.", "Mentat")
|
||||
Media.DisplayMessage(UserInterface.Translate("upgrade-barracks-light-factory"), Mentat)
|
||||
end
|
||||
|
||||
UserInterface.SetMissionText("Harvested resources: " .. player.Resources .. "/" .. SpiceToHarvest, player.Color)
|
||||
if player.Resources ~= CachedResources then
|
||||
local parameters = { ["harvested"] = player.Resources, ["goal"] = SpiceToHarvest }
|
||||
local harvestedResources = UserInterface.Translate("harvested-resources", parameters)
|
||||
UserInterface.SetMissionText(harvestedResources)
|
||||
CachedResources = player.Resources
|
||||
end
|
||||
end
|
||||
|
||||
WorldLoaded = function()
|
||||
@@ -118,16 +124,17 @@ WorldLoaded = function()
|
||||
SpiceToHarvest = ToHarvest[Difficulty]
|
||||
|
||||
InitObjectives(player)
|
||||
KillAtreides = ordos.AddPrimaryObjective("Kill all Atreides units.")
|
||||
GatherSpice = player.AddPrimaryObjective("Harvest " .. tostring(SpiceToHarvest) .. " Solaris worth of Spice.")
|
||||
KillOrdos = player.AddSecondaryObjective("Eliminate all Ordos units and reinforcements\nin the area.")
|
||||
KillAtreides = AddPrimaryObjective(ordos, "")
|
||||
local harvestSpice = UserInterface.Translate("harvest-spice", { ["spice"] = SpiceToHarvest })
|
||||
GatherSpice = AddPrimaryObjective(player, harvestSpice)
|
||||
KillOrdos = AddSecondaryObjective(player, "eliminate-ordos-units-reinforcements")
|
||||
|
||||
Camera.Position = AConyard.CenterPosition
|
||||
|
||||
local checkResourceCapacity = function()
|
||||
Trigger.AfterDelay(0, function()
|
||||
if player.ResourceCapacity < SpiceToHarvest then
|
||||
Media.DisplayMessage("We don't have enough silo space to store the required amount of Spice!", "Mentat")
|
||||
Media.DisplayMessage(UserInterface.Translate("not-enough-silos"), Mentat)
|
||||
Trigger.AfterDelay(DateTime.Seconds(3), function()
|
||||
ordos.MarkCompletedObjective(KillAtreides)
|
||||
end)
|
||||
|
||||
@@ -134,3 +134,5 @@ Actors:
|
||||
Location: 15,34
|
||||
|
||||
Rules: d2k|rules/campaign-rules.yaml, d2k|rules/campaign-tooltips.yaml, d2k|rules/campaign-palettes.yaml, rules.yaml
|
||||
|
||||
Translations: d2k|languages/lua/en.ftl
|
||||
|
||||
@@ -108,7 +108,7 @@ Tick = function()
|
||||
end
|
||||
|
||||
if harkonnen.HasNoRequiredUnits() and not player.IsObjectiveCompleted(KillHarkonnen) then
|
||||
Media.DisplayMessage("The Harkonnen have been annihilated!", "Mentat")
|
||||
Media.DisplayMessage(UserInterface.Translate("harkonnen-annihilated"), Mentat)
|
||||
player.MarkCompletedObjective(KillHarkonnen)
|
||||
player.MarkCompletedObjective(ProtectFremen)
|
||||
player.MarkCompletedObjective(KeepIntegrity)
|
||||
@@ -126,7 +126,8 @@ Tick = function()
|
||||
if not Sietch.IsDead then
|
||||
AttackNotifier = AttackNotifier - 1
|
||||
local integrity = math.floor((Sietch.Health * 100) / Sietch.MaxHealth)
|
||||
UserInterface.SetMissionText("Sietch structural integrity: " .. integrity .. "%", player.Color)
|
||||
SiegeIntegrity = UserInterface.Translate("sietch-integrity", { ["integrity"] = integrity })
|
||||
UserInterface.SetMissionText(SiegeIntegrity, player.Color)
|
||||
|
||||
if integrity < IntegrityLevel[Difficulty] then
|
||||
player.MarkFailedObjective(KeepIntegrity)
|
||||
@@ -140,17 +141,18 @@ WorldLoaded = function()
|
||||
player = Player.GetPlayer("Atreides")
|
||||
|
||||
InitObjectives(player)
|
||||
KillAtreides = harkonnen.AddPrimaryObjective("Kill all Atreides units.")
|
||||
ProtectFremen = player.AddPrimaryObjective("Protect the Fremen Sietch.")
|
||||
KillHarkonnen = player.AddPrimaryObjective("Destroy the Harkonnen.")
|
||||
KeepIntegrity = player.AddSecondaryObjective("Keep the Sietch " .. IntegrityLevel[Difficulty] .. "% intact!")
|
||||
KillAtreides = AddPrimaryObjective(harkonnen, "")
|
||||
ProtectFremen = AddPrimaryObjective(player, "protect-fremen-sietch")
|
||||
KillHarkonnen = AddPrimaryObjective(player, "destroy-harkonnen")
|
||||
local keepSietchIntact = UserInterface.Translate("keep-sietch-intact", { ["integrity"] = IntegrityLevel[Difficulty] })
|
||||
KeepIntegrity = AddPrimaryObjective(player, keepSietchIntact)
|
||||
|
||||
Camera.Position = AConyard.CenterPosition
|
||||
HarkonnenAttackLocation = AConyard.Location
|
||||
|
||||
Trigger.AfterDelay(DateTime.Seconds(2), function()
|
||||
Beacon.New(player, Sietch.CenterPosition + WVec.New(0, 1024, 0))
|
||||
Media.DisplayMessage("Fremen Sietch detected to the southeast.", "Mentat")
|
||||
Media.DisplayMessage(UserInterface.Translate("fremen-sietch-southeast"), Mentat)
|
||||
end)
|
||||
|
||||
Trigger.OnAllKilledOrCaptured(HarkonnenBase, function()
|
||||
@@ -159,14 +161,14 @@ WorldLoaded = function()
|
||||
|
||||
Trigger.OnKilled(Sietch, function()
|
||||
Actor.Create("invisibleBlocker", true, { Owner = fremen, Location = CPos.New(62, 59) })
|
||||
UserInterface.SetMissionText("Sietch destroyed!", player.Color)
|
||||
UserInterface.SetMissionText(UserInterface.Translate("sietch-destroyed"), player.Color)
|
||||
player.MarkFailedObjective(ProtectFremen)
|
||||
end)
|
||||
Trigger.OnDamaged(Sietch, function()
|
||||
if AttackNotifier <= 0 then
|
||||
AttackNotifier = DateTime.Seconds(10)
|
||||
Beacon.New(player, Sietch.CenterPosition + WVec.New(0, 1024, 0), DateTime.Seconds(7))
|
||||
Media.DisplayMessage("The Fremen Sietch is under attack!", "Mentat")
|
||||
Media.DisplayMessage(UserInterface.Translate("fremen-sietch-under-attack"), Mentat)
|
||||
|
||||
local defenders = fremen.GetGroundAttackers()
|
||||
if #defenders > 0 then
|
||||
|
||||
@@ -418,3 +418,5 @@ Actors:
|
||||
Rules: d2k|rules/campaign-rules.yaml, d2k|rules/campaign-tooltips.yaml, d2k|rules/campaign-palettes.yaml, rules.yaml
|
||||
|
||||
Sequences: sequences.yaml
|
||||
|
||||
Translations: d2k|languages/lua/en.ftl
|
||||
|
||||
@@ -186,7 +186,7 @@ SendMercenaries = function()
|
||||
Trigger.AfterDelay(MercenaryAttackDelay[Difficulty], function()
|
||||
mercWave = mercWave + 1
|
||||
|
||||
Media.DisplayMessage("Incoming hostile Mercenary force detected.", "Mentat")
|
||||
Media.DisplayMessage(UserInterface.Translate("incoming-mercenary-force"), Mentat)
|
||||
|
||||
local units = Reinforcements.Reinforce(mercenary, MercenaryReinforcements[Difficulty][mercWave], MercenarySpawn)
|
||||
Utils.Do(units, function(unit)
|
||||
@@ -206,7 +206,7 @@ end
|
||||
|
||||
SendContraband = function(owner)
|
||||
ContrabandArrived = true
|
||||
UserInterface.SetMissionText("The Contraband has arrived!", player.Color)
|
||||
UserInterface.SetMissionText(UserInterface.Translate("contraband-has-arrived"), player.Color)
|
||||
|
||||
local units = SmugglerReinforcements
|
||||
if owner == player then
|
||||
@@ -218,10 +218,10 @@ SendContraband = function(owner)
|
||||
Trigger.AfterDelay(DateTime.Seconds(3), function()
|
||||
if owner == player then
|
||||
player.MarkCompletedObjective(CaptureStarport)
|
||||
Media.DisplayMessage("Contraband has arrived and been confiscated.", "Mentat")
|
||||
Media.DisplayMessage(UserInterface.Translate("contraband-confiscated"), Mentat)
|
||||
else
|
||||
player.MarkFailedObjective(CaptureStarport)
|
||||
Media.DisplayMessage("Smuggler contraband has arrived. It is too late to confiscate.", "Mentat")
|
||||
Media.DisplayMessage(UserInterface.Translate("contraband-not-confiscated"), Mentat)
|
||||
end
|
||||
end)
|
||||
|
||||
@@ -251,12 +251,12 @@ Tick = function()
|
||||
end
|
||||
|
||||
if LastHarkonnenArrived and not player.IsObjectiveCompleted(KillHarkonnen) and harkonnen.HasNoRequiredUnits() then
|
||||
Media.DisplayMessage("The Harkonnen have been annihilated!", "Mentat")
|
||||
Media.DisplayMessage(UserInterface.Translate("atreides-05"), Mentat)
|
||||
player.MarkCompletedObjective(KillHarkonnen)
|
||||
end
|
||||
|
||||
if LastMercenariesArrived and not player.IsObjectiveCompleted(KillSmuggler) and smuggler.HasNoRequiredUnits() and mercenary.HasNoRequiredUnits() then
|
||||
Media.DisplayMessage("The Smugglers have been annihilated!", "Mentat")
|
||||
Media.DisplayMessage(UserInterface.Translate("smugglers-annihilated"), Mentat)
|
||||
player.MarkCompletedObjective(KillSmuggler)
|
||||
end
|
||||
|
||||
@@ -273,7 +273,10 @@ Tick = function()
|
||||
|
||||
if TimerTicks and not ContrabandArrived then
|
||||
TimerTicks = TimerTicks - 1
|
||||
UserInterface.SetMissionText("The contraband will arrive in " .. Utils.FormatTime(TimerTicks), player.Color)
|
||||
if (TimerTicks % DateTime.Seconds(1)) == 0 then
|
||||
local contrabandArrivesIn = UserInterface.Translate("contraband-arrives-in", { ["time"] = Utils.FormatTime(TimerTicks)})
|
||||
UserInterface.SetMissionText(contrabandArrivesIn, player.Color)
|
||||
end
|
||||
|
||||
if TimerTicks <= 0 then
|
||||
SendContraband(smuggler)
|
||||
@@ -290,10 +293,10 @@ WorldLoaded = function()
|
||||
InfantryReinforcements = Difficulty ~= "easy"
|
||||
|
||||
InitObjectives(player)
|
||||
KillAtreides = harkonnen.AddPrimaryObjective("Kill all Atreides units.")
|
||||
CaptureBarracks = player.AddPrimaryObjective("Capture the Barracks at Sietch Tabr.")
|
||||
KillHarkonnen = player.AddSecondaryObjective("Annihilate all other Harkonnen units\nand reinforcements.")
|
||||
CaptureStarport = player.AddSecondaryObjective("Capture the Smuggler Starport and\nconfiscate the contraband.")
|
||||
KillAtreides = AddPrimaryObjective(harkonnen, "")
|
||||
CaptureBarracks = AddPrimaryObjective(player, "capture-barracks-sietch-tabr")
|
||||
KillHarkonnen = AddSecondaryObjective(player, "annihilate-harkonnen-units-reinforcements")
|
||||
CaptureStarport = AddSecondaryObjective(player, "capture-smuggler-starport-confiscate-contraband")
|
||||
|
||||
Camera.Position = ARefinery.CenterPosition
|
||||
HarkonnenAttackLocation = AtreidesRally.Location
|
||||
@@ -302,7 +305,9 @@ WorldLoaded = function()
|
||||
|
||||
Trigger.AfterDelay(DateTime.Seconds(2), function()
|
||||
TimerTicks = ContrabandTimes[Difficulty]
|
||||
Media.DisplayMessage("The contraband is approaching the Starport to the north in " .. Utils.FormatTime(TimerTicks) .. ".", "Mentat")
|
||||
local time = { ["time"] = Utils.FormatTime(TimerTicks) }
|
||||
local contrabandApproaching = UserInterface.Translate("contraband-approaching-starport-north-in", time)
|
||||
Media.DisplayMessage(contrabandApproaching, Mentat)
|
||||
end)
|
||||
|
||||
Trigger.OnAllKilledOrCaptured(HarkonnenBase, function()
|
||||
@@ -312,7 +317,7 @@ WorldLoaded = function()
|
||||
Trigger.OnKilled(Starport, function()
|
||||
if not player.IsObjectiveCompleted(CaptureStarport) then
|
||||
ContrabandArrived = true
|
||||
UserInterface.SetMissionText("Starport destroyed! Contraband can't land.", player.Color)
|
||||
UserInterface.SetMissionText(UserInterface.Translate("starport-destroyed-no-contraband"), player.Color)
|
||||
player.MarkFailedObjective(CaptureStarport)
|
||||
SmugglersAttack()
|
||||
|
||||
@@ -332,7 +337,7 @@ WorldLoaded = function()
|
||||
|
||||
if AttackNotifier <= 0 then
|
||||
AttackNotifier = DateTime.Seconds(10)
|
||||
Media.DisplayMessage("Don't destroy the Starport!", "Mentat")
|
||||
Media.DisplayMessage(UserInterface.Translate("do-not-destroy-starport"), Mentat)
|
||||
|
||||
local defenders = smuggler.GetGroundAttackers()
|
||||
if #defenders > 0 then
|
||||
@@ -343,7 +348,7 @@ WorldLoaded = function()
|
||||
end
|
||||
end)
|
||||
Trigger.OnCapture(Starport, function()
|
||||
DefendStarport = player.AddSecondaryObjective("Defend the captured Starport.")
|
||||
DefendStarport = AddSecondaryObjective(player, "defend-captured-starport")
|
||||
|
||||
Trigger.ClearAll(Starport)
|
||||
Trigger.AfterDelay(0, function()
|
||||
@@ -364,11 +369,11 @@ WorldLoaded = function()
|
||||
Trigger.OnDamaged(HarkonnenBarracks, function()
|
||||
if AttackNotifier <= 0 and HarkonnenBarracks.Health < HarkonnenBarracks.MaxHealth * 3/4 then
|
||||
AttackNotifier = DateTime.Seconds(10)
|
||||
Media.DisplayMessage("Don't destroy the Barracks!", "Mentat")
|
||||
Media.DisplayMessage(UserInterface.Translate("do-not-destroy-barracks"), Mentat)
|
||||
end
|
||||
end)
|
||||
Trigger.OnCapture(HarkonnenBarracks, function()
|
||||
Media.DisplayMessage("Hostages Released!", "Mentat")
|
||||
Media.DisplayMessage(UserInterface.Translate("hostages-released"), Mentat)
|
||||
|
||||
if DefendStarport then
|
||||
player.MarkCompletedObjective(DefendStarport)
|
||||
@@ -395,7 +400,7 @@ WorldLoaded = function()
|
||||
if not warned and a.Owner == player and a.Type ~= "carryall" then
|
||||
warned = true
|
||||
Trigger.RemoveFootprintTrigger(id)
|
||||
Media.DisplayMessage("Stay away from our Starport.", "Smuggler Leader")
|
||||
Media.DisplayMessage(UserInterface.Translate("stay-away-from-starport"), UserInterface.Translate("smuggler-leader"))
|
||||
end
|
||||
end)
|
||||
|
||||
@@ -403,13 +408,13 @@ WorldLoaded = function()
|
||||
if not paid and a.Owner == player and a.Type ~= "carryall" then
|
||||
paid = true
|
||||
Trigger.RemoveFootprintTrigger(id)
|
||||
Media.DisplayMessage("You were warned. Now you will pay.", "Smuggler Leader")
|
||||
Media.DisplayMessage(UserInterface.Translate("were-warned-will-pay"), UserInterface.Translate("smuggler-leader"))
|
||||
Utils.Do(smuggler.GetGroundAttackers(), function(unit)
|
||||
unit.AttackMove(SmugglerWaypoint2.Location)
|
||||
end)
|
||||
|
||||
Trigger.AfterDelay(DateTime.Seconds(3), function()
|
||||
KillSmuggler = player.AddSecondaryObjective("Destroy the Smugglers and their Mercenaries.")
|
||||
KillSmuggler = AddSecondaryObjective(player, "destroy-smugglers-mercenaries")
|
||||
SendMercenaries()
|
||||
end)
|
||||
end
|
||||
@@ -418,7 +423,7 @@ WorldLoaded = function()
|
||||
Trigger.OnEnteredProximityTrigger(HarkonnenBarracks.CenterPosition, WDist.New(5 * 1024), function(a, id)
|
||||
if a.Owner == player and a.Type ~= "carryall" then
|
||||
Trigger.RemoveProximityTrigger(id)
|
||||
Media.DisplayMessage("Capture the Harkonnen barracks to release the hostages.", "Mentat")
|
||||
Media.DisplayMessage(UserInterface.Translate("capture-harkonnen-barracks-release-hostages"), Mentat)
|
||||
StopInfantryProduction = true
|
||||
end
|
||||
end)
|
||||
|
||||
@@ -367,3 +367,5 @@ Actors:
|
||||
Location: 49,4
|
||||
|
||||
Rules: d2k|rules/campaign-rules.yaml, d2k|rules/campaign-tooltips.yaml, d2k|rules/campaign-palettes.yaml, rules.yaml
|
||||
|
||||
Translations: d2k|languages/lua/en.ftl
|
||||
|
||||
@@ -53,12 +53,13 @@ HarkonnenEntryPath = { HarkonnenWaypoint.Location, HarkonnenRally.Location }
|
||||
|
||||
Messages =
|
||||
{
|
||||
"Build a concrete foundation before placing your buildings.",
|
||||
"Build a Wind Trap for power.",
|
||||
"Build a Refinery to collect Spice.",
|
||||
"Build a Silo to store additional Spice."
|
||||
UserInterface.Translate("build-concrete"),
|
||||
UserInterface.Translate("build-windtrap"),
|
||||
UserInterface.Translate("build-refinery"),
|
||||
UserInterface.Translate("build-silo")
|
||||
}
|
||||
|
||||
CachedResources = -1
|
||||
Tick = function()
|
||||
if AtreidesArrived and atreides.HasNoRequiredUnits() then
|
||||
player.MarkCompletedObjective(KillAtreides)
|
||||
@@ -71,21 +72,26 @@ Tick = function()
|
||||
-- player has no Wind Trap
|
||||
if (player.PowerProvided <= 20 or player.PowerState ~= "Normal") and DateTime.GameTime % DateTime.Seconds(32) == 0 then
|
||||
HasPower = false
|
||||
Media.DisplayMessage(Messages[2], "Mentat")
|
||||
Media.DisplayMessage(Messages[2], Mentat)
|
||||
else
|
||||
HasPower = true
|
||||
end
|
||||
|
||||
-- player has no Refinery and no Silos
|
||||
if HasPower and player.ResourceCapacity == 0 and DateTime.GameTime % DateTime.Seconds(32) == 0 then
|
||||
Media.DisplayMessage(Messages[3], "Mentat")
|
||||
Media.DisplayMessage(Messages[3], Mentat)
|
||||
end
|
||||
|
||||
if HasPower and player.Resources > player.ResourceCapacity * 0.8 and DateTime.GameTime % DateTime.Seconds(32) == 0 then
|
||||
Media.DisplayMessage(Messages[4], "Mentat")
|
||||
Media.DisplayMessage(Messages[4], Mentat)
|
||||
end
|
||||
|
||||
UserInterface.SetMissionText("Harvested resources: " .. player.Resources .. "/" .. SpiceToHarvest, player.Color)
|
||||
if player.Resources ~= CachedResources then
|
||||
local parameters = { ["harvested"] = player.Resources, ["goal"] = SpiceToHarvest }
|
||||
local harvestedResources = UserInterface.Translate("harvested-resources", parameters)
|
||||
UserInterface.SetMissionText(harvestedResources)
|
||||
CachedResources = player.Resources
|
||||
end
|
||||
end
|
||||
|
||||
WorldLoaded = function()
|
||||
@@ -95,14 +101,15 @@ WorldLoaded = function()
|
||||
SpiceToHarvest = ToHarvest[Difficulty]
|
||||
|
||||
InitObjectives(player)
|
||||
KillHarkonnen = atreides.AddPrimaryObjective("Kill all Harkonnen units.")
|
||||
GatherSpice = player.AddPrimaryObjective("Harvest " .. tostring(SpiceToHarvest) .. " Solaris worth of Spice.")
|
||||
KillAtreides = player.AddSecondaryObjective("Eliminate all Atreides units and reinforcements\nin the area.")
|
||||
KillHarkonnen = AddPrimaryObjective(atreides, "")
|
||||
local harvestSpice = UserInterface.Translate("harvest-spice", { ["spice"] = SpiceToHarvest })
|
||||
GatherSpice = AddPrimaryObjective(player, harvestSpice)
|
||||
KillAtreides = AddSecondaryObjective(player, "eliminate-atreides-units-reinforcements")
|
||||
|
||||
local checkResourceCapacity = function()
|
||||
Trigger.AfterDelay(0, function()
|
||||
if player.ResourceCapacity < SpiceToHarvest then
|
||||
Media.DisplayMessage("We don't have enough silo space to store the required amount of Spice!", "Mentat")
|
||||
Media.DisplayMessage(UserInterface.Translate("not-enough-silos"), Mentat)
|
||||
Trigger.AfterDelay(DateTime.Seconds(3), function()
|
||||
harkonnen.MarkCompletedObjective(KillAtreides)
|
||||
end)
|
||||
@@ -134,7 +141,7 @@ WorldLoaded = function()
|
||||
end
|
||||
end)
|
||||
|
||||
Media.DisplayMessage(Messages[1], "Mentat")
|
||||
Media.DisplayMessage(Messages[1], Mentat)
|
||||
|
||||
Trigger.AfterDelay(DateTime.Seconds(25), function()
|
||||
Media.PlaySpeechNotification(player, "Reinforce")
|
||||
|
||||
@@ -108,3 +108,5 @@ Actors:
|
||||
Location: 29,7
|
||||
|
||||
Rules: d2k|rules/campaign-rules.yaml, d2k|rules/campaign-tooltips.yaml, d2k|rules/campaign-palettes.yaml, rules.yaml
|
||||
|
||||
Translations: d2k|languages/lua/en.ftl
|
||||
|
||||
@@ -53,12 +53,13 @@ HarkonnenEntryPath = { HarkonnenWaypoint.Location, HarkonnenRally.Location }
|
||||
|
||||
Messages =
|
||||
{
|
||||
"Build a concrete foundation before placing your buildings.",
|
||||
"Build a Wind Trap for power.",
|
||||
"Build a Refinery to collect Spice.",
|
||||
"Build a Silo to store additional Spice."
|
||||
UserInterface.Translate("build-concrete"),
|
||||
UserInterface.Translate("build-windtrap"),
|
||||
UserInterface.Translate("build-refinery"),
|
||||
UserInterface.Translate("build-silo")
|
||||
}
|
||||
|
||||
CachedResources = -1
|
||||
Tick = function()
|
||||
if AtreidesArrived and atreides.HasNoRequiredUnits() then
|
||||
player.MarkCompletedObjective(KillAtreides)
|
||||
@@ -71,21 +72,26 @@ Tick = function()
|
||||
-- player has no Wind Trap
|
||||
if (player.PowerProvided <= 20 or player.PowerState ~= "Normal") and DateTime.GameTime % DateTime.Seconds(32) == 0 then
|
||||
HasPower = false
|
||||
Media.DisplayMessage(Messages[2], "Mentat")
|
||||
Media.DisplayMessage(Messages[2], Mentat)
|
||||
else
|
||||
HasPower = true
|
||||
end
|
||||
|
||||
-- player has no Refinery and no Silos
|
||||
if HasPower and player.ResourceCapacity == 0 and DateTime.GameTime % DateTime.Seconds(32) == 0 then
|
||||
Media.DisplayMessage(Messages[3], "Mentat")
|
||||
Media.DisplayMessage(Messages[3], Mentat)
|
||||
end
|
||||
|
||||
if HasPower and player.Resources > player.ResourceCapacity * 0.8 and DateTime.GameTime % DateTime.Seconds(32) == 0 then
|
||||
Media.DisplayMessage(Messages[4], "Mentat")
|
||||
Media.DisplayMessage(Messages[4], Mentat)
|
||||
end
|
||||
|
||||
UserInterface.SetMissionText("Harvested resources: " .. player.Resources .. "/" .. SpiceToHarvest, player.Color)
|
||||
if player.Resources ~= CachedResources then
|
||||
local parameters = { ["harvested"] = player.Resources, ["goal"] = SpiceToHarvest }
|
||||
local harvestedResources = UserInterface.Translate("harvested-resources", parameters)
|
||||
UserInterface.SetMissionText(harvestedResources)
|
||||
CachedResources = player.Resources
|
||||
end
|
||||
end
|
||||
|
||||
WorldLoaded = function()
|
||||
@@ -95,14 +101,15 @@ WorldLoaded = function()
|
||||
SpiceToHarvest = ToHarvest[Difficulty]
|
||||
|
||||
InitObjectives(player)
|
||||
KillHarkonnen = atreides.AddPrimaryObjective("Kill all Harkonnen units.")
|
||||
GatherSpice = player.AddPrimaryObjective("Harvest " .. tostring(SpiceToHarvest) .. " Solaris worth of Spice.")
|
||||
KillAtreides = player.AddSecondaryObjective("Eliminate all Atreides units and reinforcements\nin the area.")
|
||||
KillHarkonnen = AddPrimaryObjective(atreides, "")
|
||||
local harvestSpice = UserInterface.Translate("harvest-spice", { ["spice"] = SpiceToHarvest })
|
||||
GatherSpice = AddPrimaryObjective(player, harvestSpice)
|
||||
KillAtreides = AddSecondaryObjective(player, "eliminate-atreides-units-reinforcements")
|
||||
|
||||
local checkResourceCapacity = function()
|
||||
Trigger.AfterDelay(0, function()
|
||||
if player.ResourceCapacity < SpiceToHarvest then
|
||||
Media.DisplayMessage("We don't have enough silo space to store the required amount of Spice!", "Mentat")
|
||||
Media.DisplayMessage(UserInterface.Translate("not-enough-silos"), Mentat)
|
||||
Trigger.AfterDelay(DateTime.Seconds(3), function()
|
||||
harkonnen.MarkCompletedObjective(KillAtreides)
|
||||
end)
|
||||
@@ -134,7 +141,7 @@ WorldLoaded = function()
|
||||
end
|
||||
end)
|
||||
|
||||
Media.DisplayMessage(Messages[1], "Mentat")
|
||||
Media.DisplayMessage(Messages[1], Mentat)
|
||||
|
||||
Trigger.AfterDelay(DateTime.Seconds(25), function()
|
||||
Media.PlaySpeechNotification(player, "Reinforce")
|
||||
|
||||
@@ -108,3 +108,5 @@ Actors:
|
||||
Location: 28,2
|
||||
|
||||
Rules: d2k|rules/campaign-rules.yaml, d2k|rules/campaign-tooltips.yaml, d2k|rules/campaign-palettes.yaml, rules.yaml
|
||||
|
||||
Translations: d2k|languages/lua/en.ftl
|
||||
|
||||
@@ -70,7 +70,7 @@ Tick = function()
|
||||
end
|
||||
|
||||
if atreides.HasNoRequiredUnits() and not player.IsObjectiveCompleted(KillAtreides) then
|
||||
Media.DisplayMessage("The Atreides have been annihilated!", "Mentat")
|
||||
Media.DisplayMessage(UserInterface.Translate("atreides-annihilated"), Mentat)
|
||||
player.MarkCompletedObjective(KillAtreides)
|
||||
end
|
||||
end
|
||||
@@ -80,8 +80,8 @@ WorldLoaded = function()
|
||||
player = Player.GetPlayer("Harkonnen")
|
||||
|
||||
InitObjectives(player)
|
||||
KillHarkonnen = atreides.AddPrimaryObjective("Kill all Harkonnen units.")
|
||||
KillAtreides = player.AddPrimaryObjective("Destroy all Atreides forces.")
|
||||
KillHarkonnen = AddPrimaryObjective(atreides, "")
|
||||
KillAtreides = AddSecondaryObjective(player, "destroy-atreides-forces")
|
||||
|
||||
Camera.Position = HConyard.CenterPosition
|
||||
|
||||
|
||||
@@ -164,3 +164,5 @@ Actors:
|
||||
Location: 47,4
|
||||
|
||||
Rules: d2k|rules/campaign-rules.yaml, d2k|rules/campaign-tooltips.yaml, d2k|rules/campaign-palettes.yaml, rules.yaml
|
||||
|
||||
Translations: d2k|languages/lua/en.ftl
|
||||
|
||||
@@ -70,7 +70,7 @@ Tick = function()
|
||||
end
|
||||
|
||||
if atreides.HasNoRequiredUnits() and not player.IsObjectiveCompleted(KillAtreides) then
|
||||
Media.DisplayMessage("The Atreides have been annihilated!", "Mentat")
|
||||
Media.DisplayMessage(UserInterface.Translate("atreides-annihilated"), Mentat)
|
||||
player.MarkCompletedObjective(KillAtreides)
|
||||
end
|
||||
end
|
||||
@@ -80,8 +80,8 @@ WorldLoaded = function()
|
||||
player = Player.GetPlayer("Harkonnen")
|
||||
|
||||
InitObjectives(player)
|
||||
KillHarkonnen = atreides.AddPrimaryObjective("Kill all Harkonnen units.")
|
||||
KillAtreides = player.AddPrimaryObjective("Destroy all Atreides forces.")
|
||||
KillHarkonnen = AddPrimaryObjective(atreides, "")
|
||||
KillAtreides = AddSecondaryObjective(player, "destroy-atreides-forces")
|
||||
|
||||
Camera.Position = HConyard.CenterPosition
|
||||
|
||||
|
||||
@@ -146,3 +146,5 @@ Actors:
|
||||
Location: 23,16
|
||||
|
||||
Rules: d2k|rules/campaign-rules.yaml, d2k|rules/campaign-tooltips.yaml, d2k|rules/campaign-palettes.yaml, rules.yaml
|
||||
|
||||
Translations: d2k|languages/lua/en.ftl
|
||||
|
||||
@@ -103,7 +103,7 @@ Tick = function()
|
||||
end
|
||||
|
||||
if atreides.HasNoRequiredUnits() and not player.IsObjectiveCompleted(KillAtreides) then
|
||||
Media.DisplayMessage("The Atreides have been annihilated!", "Mentat")
|
||||
Media.DisplayMessage(UserInterface.Translate("atreides-annihilated"), Mentat)
|
||||
player.MarkCompletedObjective(KillAtreides)
|
||||
end
|
||||
|
||||
@@ -117,7 +117,7 @@ Tick = function()
|
||||
end
|
||||
|
||||
if DateTime.GameTime % DateTime.Seconds(32) == 0 and (MessageCheck(1) or MessageCheck(2)) then
|
||||
Media.DisplayMessage("Upgrade barracks and light factory to produce more advanced units.", "Mentat")
|
||||
Media.DisplayMessage(UserInterface.Translate("upgrade-barracks-light-factory"), Mentat)
|
||||
end
|
||||
end
|
||||
|
||||
@@ -126,8 +126,8 @@ WorldLoaded = function()
|
||||
player = Player.GetPlayer("Harkonnen")
|
||||
|
||||
InitObjectives(player)
|
||||
KillHarkonnen = atreides.AddPrimaryObjective("Kill all Harkonnen units.")
|
||||
KillAtreides = player.AddPrimaryObjective("Eliminate all Atreides units and reinforcements\nin the area.")
|
||||
KillHarkonnen = AddPrimaryObjective(atreides, "")
|
||||
KillAtreides = AddPrimaryObjective(player, "eliminate-atreides-units-reinforcements")
|
||||
|
||||
Camera.Position = HConyard.CenterPosition
|
||||
|
||||
|
||||
@@ -179,3 +179,5 @@ Actors:
|
||||
Location: 29,2
|
||||
|
||||
Rules: d2k|rules/campaign-rules.yaml, d2k|rules/campaign-tooltips.yaml, d2k|rules/campaign-palettes.yaml, rules.yaml
|
||||
|
||||
Translations: d2k|languages/lua/en.ftl
|
||||
|
||||
@@ -105,7 +105,7 @@ Tick = function()
|
||||
end
|
||||
|
||||
if atreides.HasNoRequiredUnits() and not player.IsObjectiveCompleted(KillAtreides) then
|
||||
Media.DisplayMessage("The Atreides have been annihilated!", "Mentat")
|
||||
Media.DisplayMessage(UserInterface.Translate("atreides-annihilated"), Mentat)
|
||||
player.MarkCompletedObjective(KillAtreides)
|
||||
end
|
||||
|
||||
@@ -119,7 +119,7 @@ Tick = function()
|
||||
end
|
||||
|
||||
if DateTime.GameTime % DateTime.Seconds(32) == 0 and (MessageCheck(1) or MessageCheck(2)) then
|
||||
Media.DisplayMessage("Upgrade barracks and light factory to produce more advanced units.", "Mentat")
|
||||
Media.DisplayMessage(UserInterface.Translate("upgrade-barracks-light-factory"), Mentat)
|
||||
end
|
||||
end
|
||||
|
||||
@@ -128,8 +128,8 @@ WorldLoaded = function()
|
||||
player = Player.GetPlayer("Harkonnen")
|
||||
|
||||
InitObjectives(player)
|
||||
KillHarkonnen = atreides.AddPrimaryObjective("Kill all Harkonnen units.")
|
||||
KillAtreides = player.AddPrimaryObjective("Eliminate all Atreides units and reinforcements\nin the area.")
|
||||
KillHarkonnen = AddPrimaryObjective(atreides, "")
|
||||
KillAtreides = AddPrimaryObjective(player, "eliminate-atreides-units-reinforcements")
|
||||
|
||||
Camera.Position = HConyard.CenterPosition
|
||||
|
||||
|
||||
@@ -209,3 +209,5 @@ Actors:
|
||||
Location: 65,45
|
||||
|
||||
Rules: d2k|rules/campaign-rules.yaml, d2k|rules/campaign-tooltips.yaml, d2k|rules/campaign-palettes.yaml, rules.yaml
|
||||
|
||||
Translations: d2k|languages/lua/en.ftl
|
||||
|
||||
@@ -133,12 +133,12 @@ Tick = function()
|
||||
end
|
||||
|
||||
if atreides.HasNoRequiredUnits() and not player.IsObjectiveCompleted(KillAtreides) then
|
||||
Media.DisplayMessage("The Atreides have been annihilated!", "Mentat")
|
||||
Media.DisplayMessage(UserInterface.Translate("atreides-annihilated"), Mentat)
|
||||
player.MarkCompletedObjective(KillAtreides)
|
||||
end
|
||||
|
||||
if fremen.HasNoRequiredUnits() and not player.IsObjectiveCompleted(KillFremen) then
|
||||
Media.DisplayMessage("The Fremen have been annihilated!", "Mentat")
|
||||
Media.DisplayMessage(UserInterface.Translate("fremen-annihilated"), Mentat)
|
||||
player.MarkCompletedObjective(KillFremen)
|
||||
end
|
||||
|
||||
@@ -158,9 +158,9 @@ WorldLoaded = function()
|
||||
player = Player.GetPlayer("Harkonnen")
|
||||
|
||||
InitObjectives(player)
|
||||
KillAtreides = player.AddPrimaryObjective("Destroy the Atreiedes.")
|
||||
KillFremen = player.AddPrimaryObjective("Destroy the Fremen.")
|
||||
KillHarkonnen = atreides.AddPrimaryObjective("Kill all Harkonnen units.")
|
||||
KillAtreides = AddPrimaryObjective(player, "destroy-atreides")
|
||||
KillFremen = AddPrimaryObjective(player, "destroy-fremen")
|
||||
KillHarkonnen = AddPrimaryObjective(atreides, "")
|
||||
|
||||
Camera.Position = HConyard.CenterPosition
|
||||
FremenAttackLocation = HConyard.Location
|
||||
@@ -191,7 +191,7 @@ WorldLoaded = function()
|
||||
end)
|
||||
|
||||
Trigger.AfterDelay(DateTime.Seconds(15), function()
|
||||
Media.DisplayMessage("Fremen concentrations spotted to the North and Southwest.", "Mentat")
|
||||
Media.DisplayMessage(UserInterface.Translate("fremen-spotted-north-southeast"), Mentat)
|
||||
end)
|
||||
|
||||
local atreidesCondition = function() return player.IsObjectiveCompleted(KillAtreides) end
|
||||
|
||||
@@ -378,3 +378,5 @@ Actors:
|
||||
Location: 22,91
|
||||
|
||||
Rules: d2k|rules/campaign-rules.yaml, d2k|rules/campaign-tooltips.yaml, d2k|rules/campaign-palettes.yaml, rules.yaml
|
||||
|
||||
Translations: d2k|languages/lua/en.ftl
|
||||
|
||||
@@ -147,7 +147,7 @@ SendStarportReinforcements = function()
|
||||
return
|
||||
end
|
||||
|
||||
Media.DisplayMessage("Imperial ships penetrating defense grid!", "Mentat")
|
||||
Media.DisplayMessage(UserInterface.Translate("imperial-ships-penetrating-defense-grid"), Mentat)
|
||||
end)
|
||||
end
|
||||
|
||||
@@ -171,7 +171,7 @@ OrdosReinforcementNotification = function(currentWave, totalWaves)
|
||||
return
|
||||
end
|
||||
|
||||
Media.DisplayMessage("Enemy carryall drop detected!", "Mentat")
|
||||
Media.DisplayMessage(UserInterface.Translate("enemy-carryall-drop-detected"), Mentat)
|
||||
|
||||
OrdosReinforcementNotification(currentWave, totalWaves)
|
||||
end)
|
||||
@@ -186,12 +186,12 @@ Tick = function()
|
||||
end
|
||||
|
||||
if ordos_main.HasNoRequiredUnits() and ordos_small.HasNoRequiredUnits() and not player.IsObjectiveCompleted(KillOrdos) then
|
||||
Media.DisplayMessage("The Ordos have been annihilated!", "Mentat")
|
||||
Media.DisplayMessage(UserInterface.Translate("ordos-annihilated"), Mentat)
|
||||
player.MarkCompletedObjective(KillOrdos)
|
||||
end
|
||||
|
||||
if corrino.HasNoRequiredUnits() and not player.IsObjectiveCompleted(KillCorrino) then
|
||||
Media.DisplayMessage("The Emperor has been annihilated!", "Mentat")
|
||||
Media.DisplayMessage(UserInterface.Translate("emperor-annihilated"), Mentat)
|
||||
player.MarkCompletedObjective(KillCorrino)
|
||||
end
|
||||
|
||||
@@ -229,12 +229,12 @@ WorldLoaded = function()
|
||||
player = Player.GetPlayer("Harkonnen")
|
||||
|
||||
InitObjectives(player)
|
||||
KillOrdos = player.AddPrimaryObjective("Destroy the Ordos.")
|
||||
KillCorrino = player.AddPrimaryObjective("Destroy the Imperial Forces.")
|
||||
GuardOutpost = player.AddSecondaryObjective("Keep the Modified Outpost intact.")
|
||||
KillHarkonnen1 = ordos_main.AddPrimaryObjective("Kill all Harkonnen units.")
|
||||
KillHarkonnen2 = ordos_small.AddPrimaryObjective("Kill all Harkonnen units.")
|
||||
KillHarkonnen3 = corrino.AddPrimaryObjective("Kill all Harkonnen units.")
|
||||
KillOrdos = AddPrimaryObjective(player, "destroy-ordos")
|
||||
KillCorrino = AddPrimaryObjective(player, "destroy-imperial-forces")
|
||||
GuardOutpost = AddSecondaryObjective(player, "keep-modified-outpost-intact")
|
||||
KillHarkonnen1 = AddPrimaryObjective(ordos_main, "")
|
||||
KillHarkonnen2 = AddPrimaryObjective(ordos_small, "")
|
||||
KillHarkonnen3 = AddPrimaryObjective(corrino, "")
|
||||
|
||||
HOutpost.GrantCondition("modified")
|
||||
|
||||
@@ -254,7 +254,7 @@ WorldLoaded = function()
|
||||
end)
|
||||
|
||||
Trigger.AfterDelay(DateTime.Seconds(5), function()
|
||||
Media.DisplayMessage("Protect the Outpost from attack.", "Mentat")
|
||||
Media.DisplayMessage(UserInterface.Translate("protect-outpost"), Mentat)
|
||||
end)
|
||||
|
||||
local path = function() return Utils.Random(OrdosPaths) end
|
||||
|
||||
@@ -516,3 +516,5 @@ Actors:
|
||||
Location: 2,29
|
||||
|
||||
Rules: d2k|rules/campaign-rules.yaml, d2k|rules/campaign-tooltips.yaml, d2k|rules/campaign-palettes.yaml, rules.yaml
|
||||
|
||||
Translations: d2k|languages/lua/en.ftl
|
||||
|
||||
@@ -125,7 +125,7 @@ SendStarportReinforcements = function()
|
||||
IdleHunt(unit)
|
||||
end)
|
||||
|
||||
Media.DisplayMessage("Ixian transports detected.", "Mentat")
|
||||
Media.DisplayMessage(UserInterface.Translate("ixian-transports-detected"), Mentat)
|
||||
|
||||
SendStarportReinforcements()
|
||||
end)
|
||||
@@ -191,7 +191,7 @@ CheckSmugglerEnemies = function()
|
||||
if attacker.Owner == player and not message_check then
|
||||
|
||||
message_check = true
|
||||
Media.DisplayMessage("The Smugglers are now hostile!", "Mentat")
|
||||
Media.DisplayMessage(UserInterface.Translate("smugglers-now-hostile"), Mentat)
|
||||
end
|
||||
end)
|
||||
end)
|
||||
@@ -204,12 +204,12 @@ Tick = function()
|
||||
end
|
||||
|
||||
if ordos_main.HasNoRequiredUnits() and ordos_small.HasNoRequiredUnits() and not OrdosKilled then
|
||||
Media.DisplayMessage("The Ordos have been annihilated!", "Mentat")
|
||||
Media.DisplayMessage(UserInterface.Translate("ordos-annihilated"), Mentat)
|
||||
OrdosKilled = true
|
||||
end
|
||||
|
||||
if smuggler_neutral.HasNoRequiredUnits() and smuggler_harkonnen.HasNoRequiredUnits() and smuggler_ordos.HasNoRequiredUnits() and smuggler_both.HasNoRequiredUnits() and not SmugglersKilled then
|
||||
Media.DisplayMessage("The Smugglers have been annihilated!", "Mentat")
|
||||
Media.DisplayMessage(UserInterface.Translate("smugglers-annihilated"), Mentat)
|
||||
SmugglersKilled = true
|
||||
end
|
||||
|
||||
@@ -246,9 +246,9 @@ WorldLoaded = function()
|
||||
player = Player.GetPlayer("Harkonnen")
|
||||
|
||||
InitObjectives(player)
|
||||
DestroyStarport = player.AddPrimaryObjective("Capture or Destroy the Ordos Starport.")
|
||||
KillHarkonnen1 = ordos_main.AddPrimaryObjective("Kill all Harkonnen units.")
|
||||
KillHarkonnen2 = ordos_small.AddPrimaryObjective("Kill all Harkonnen units.")
|
||||
DestroyStarport = AddPrimaryObjective(player, "capture-destroy-ordos-starport")
|
||||
KillHarkonnen1 = AddPrimaryObjective(ordos_main, "")
|
||||
KillHarkonnen2 = AddPrimaryObjective(ordos_small, "")
|
||||
|
||||
-- Wait for carryall drop
|
||||
Trigger.AfterDelay(DateTime.Seconds(10), function()
|
||||
|
||||
@@ -717,3 +717,5 @@ Actors:
|
||||
Location: 2,68
|
||||
|
||||
Rules: d2k|rules/campaign-rules.yaml, d2k|rules/campaign-tooltips.yaml, d2k|rules/campaign-palettes.yaml, rules.yaml
|
||||
|
||||
Translations: d2k|languages/lua/en.ftl
|
||||
|
||||
@@ -112,7 +112,7 @@ SendStarportReinforcements = function()
|
||||
IdleHunt(unit)
|
||||
end)
|
||||
|
||||
Media.DisplayMessage("Ixian transports detected.", "Mentat")
|
||||
Media.DisplayMessage(UserInterface.Translate("ixian-transports-detected"), Mentat)
|
||||
|
||||
SendStarportReinforcements()
|
||||
end)
|
||||
@@ -149,7 +149,7 @@ CheckSmugglerEnemies = function()
|
||||
if attacker.Owner == player and not message_check then
|
||||
|
||||
message_check = true
|
||||
Media.DisplayMessage("The Smugglers are now hostile!", "Mentat")
|
||||
Media.DisplayMessage(UserInterface.Translate("smugglers-now-hostile"), Mentat)
|
||||
end
|
||||
end)
|
||||
end)
|
||||
@@ -162,12 +162,12 @@ Tick = function()
|
||||
end
|
||||
|
||||
if ordos_main.HasNoRequiredUnits() and ordos_small.HasNoRequiredUnits() and not OrdosKilled then
|
||||
Media.DisplayMessage("The Ordos have been annihilated!", "Mentat")
|
||||
Media.DisplayMessage(UserInterface.Translate("ordos-annihilated"), Mentat)
|
||||
OrdosKilled = true
|
||||
end
|
||||
|
||||
if smuggler_neutral.HasNoRequiredUnits() and smuggler_harkonnen.HasNoRequiredUnits() and smuggler_ordos.HasNoRequiredUnits() and smuggler_both.HasNoRequiredUnits() and not SmugglersKilled then
|
||||
Media.DisplayMessage("The Smugglers have been annihilated!", "Mentat")
|
||||
Media.DisplayMessage(UserInterface.Translate("smugglers-annihilated"), Mentat)
|
||||
SmugglersKilled = true
|
||||
end
|
||||
|
||||
@@ -204,9 +204,9 @@ WorldLoaded = function()
|
||||
player = Player.GetPlayer("Harkonnen")
|
||||
|
||||
InitObjectives(player)
|
||||
DestroyStarport = player.AddPrimaryObjective("Capture or Destroy the Ordos Starport.")
|
||||
KillHarkonnen1 = ordos_main.AddPrimaryObjective("Kill all Harkonnen units.")
|
||||
KillHarkonnen2 = ordos_small.AddPrimaryObjective("Kill all Harkonnen units.")
|
||||
DestroyStarport = AddPrimaryObjective(player, "capture-destroy-ordos-starport")
|
||||
KillHarkonnen1 = AddPrimaryObjective(ordos_main, "")
|
||||
KillHarkonnen2 = AddPrimaryObjective(ordos_small, "")
|
||||
|
||||
-- Wait for carryall drop
|
||||
Trigger.AfterDelay(DateTime.Seconds(15), function()
|
||||
|
||||
@@ -654,3 +654,5 @@ Actors:
|
||||
Location: 2,9
|
||||
|
||||
Rules: d2k|rules/campaign-rules.yaml, d2k|rules/campaign-tooltips.yaml, d2k|rules/campaign-palettes.yaml, rules.yaml
|
||||
|
||||
Translations: d2k|languages/lua/en.ftl
|
||||
|
||||
@@ -177,12 +177,12 @@ Tick = function()
|
||||
end
|
||||
|
||||
if atreides_main.HasNoRequiredUnits() and atreides_small.HasNoRequiredUnits() and not player.IsObjectiveCompleted(KillAtreides) then
|
||||
Media.DisplayMessage("The Atreides have been annihilated!", "Mentat")
|
||||
Media.DisplayMessage(UserInterface.Translate("atreides-annihilated"), Mentat)
|
||||
player.MarkCompletedObjective(KillAtreides)
|
||||
end
|
||||
|
||||
if corrino.HasNoRequiredUnits() and not player.IsObjectiveCompleted(KillCorrino) then
|
||||
Media.DisplayMessage("The Emperor have been annihilated!", "Mentat")
|
||||
Media.DisplayMessage(UserInterface.Translate("emperor-annihilated"), Mentat)
|
||||
player.MarkCompletedObjective(KillCorrino)
|
||||
end
|
||||
|
||||
@@ -191,7 +191,7 @@ Tick = function()
|
||||
end
|
||||
|
||||
if (AHiTechFactory.IsDead or AHiTechFactory.Owner ~= atreides_main) and not HiTechIsDead then
|
||||
Media.DisplayMessage("High Tech Factory neutralized! Atreides cut off from Imperial reinforcement!", "Mentat")
|
||||
Media.DisplayMessage(UserInterface.Translate("high-tech-factory-neutralized-imperial-reinforcements"), Mentat)
|
||||
HiTechIsDead = true
|
||||
end
|
||||
|
||||
@@ -221,14 +221,14 @@ WorldLoaded = function()
|
||||
player = Player.GetPlayer("Harkonnen")
|
||||
|
||||
InitObjectives(player)
|
||||
CaptureAtreidesConYard = player.AddPrimaryObjective("Capture the Atreides Construction Yard at the South.")
|
||||
KillAtreides = player.AddPrimaryObjective("Destroy the Atreides.")
|
||||
KillCorrino = player.AddPrimaryObjective("Destroy the Corrino.")
|
||||
KillHarkonnen1 = atreides_main.AddPrimaryObjective("Kill all Harkonnen units.")
|
||||
KillHarkonnen2 = atreides_small.AddPrimaryObjective("Kill all Harkonnen units.")
|
||||
KillHarkonnen3 = corrino.AddPrimaryObjective("Kill all Harkonnen units.")
|
||||
CaptureAtreidesConYard = AddPrimaryObjective(player, "capture-atreides-construction-yard-south")
|
||||
KillAtreides = AddPrimaryObjective(player, "destroy-atreides")
|
||||
KillCorrino = AddPrimaryObjective(player, "destroy-corrino")
|
||||
KillHarkonnen1 = AddPrimaryObjective(atreides_main, "")
|
||||
KillHarkonnen2 = AddPrimaryObjective(atreides_small, "")
|
||||
KillHarkonnen3 = AddPrimaryObjective(corrino, "")
|
||||
|
||||
Media.DisplayMessage("Destroy Atreides High Tech Factory to cut off Atreides from Imperial reinforcements.", "Mentat")
|
||||
Media.DisplayMessage(UserInterface.Translate("destroy-atreides-high-tech-factory-imperial-reinforcements"), Mentat)
|
||||
|
||||
Camera.Position = HEngineer.CenterPosition
|
||||
AtreidesAttackLocation = AConYard2.Location
|
||||
|
||||
@@ -771,3 +771,5 @@ Actors:
|
||||
Location: 2,27
|
||||
|
||||
Rules: d2k|rules/campaign-rules.yaml, d2k|rules/campaign-tooltips.yaml, d2k|rules/campaign-palettes.yaml, rules.yaml
|
||||
|
||||
Translations: d2k|languages/lua/en.ftl
|
||||
|
||||
@@ -201,7 +201,7 @@ CheckAttackToAtreides = function()
|
||||
end)
|
||||
|
||||
check = true
|
||||
Media.DisplayMessage("The Atreides are now hostile!", "Mentat")
|
||||
Media.DisplayMessage(UserInterface.Translate("atreides-hostile"), Mentat)
|
||||
end
|
||||
end)
|
||||
end)
|
||||
@@ -223,17 +223,17 @@ Tick = function()
|
||||
end
|
||||
|
||||
if ordos.HasNoRequiredUnits() and not player.IsObjectiveCompleted(KillOrdos) then
|
||||
Media.DisplayMessage("The Ordos have been annihilated!", "Mentat")
|
||||
Media.DisplayMessage(UserInterface.Translate("ordos-annihilated"), Mentat)
|
||||
player.MarkCompletedObjective(KillOrdos)
|
||||
end
|
||||
|
||||
if atreides_enemy.HasNoRequiredUnits() and atreides_neutral.HasNoRequiredUnits() and not player.IsObjectiveCompleted(KillAtreides) then
|
||||
Media.DisplayMessage("The Atreides have been annihilated!", "Mentat")
|
||||
Media.DisplayMessage(UserInterface.Translate("atreides-annihilated"), Mentat)
|
||||
player.MarkCompletedObjective(KillAtreides)
|
||||
end
|
||||
|
||||
if mercenary_enemy.HasNoRequiredUnits() and mercenary_ally.HasNoRequiredUnits() and not MercenariesDestroyed then
|
||||
Media.DisplayMessage("The Mercenaries have been annihilated!", "Mentat")
|
||||
Media.DisplayMessage(UserInterface.Translate("mercenaries-annihilated"), Mentat)
|
||||
MercenariesDestroyed = true
|
||||
end
|
||||
|
||||
@@ -265,11 +265,11 @@ WorldLoaded = function()
|
||||
player = Player.GetPlayer("Harkonnen")
|
||||
|
||||
InitObjectives(player)
|
||||
KillOrdos = player.AddPrimaryObjective("Destroy the Ordos.")
|
||||
KillAtreides = player.AddSecondaryObjective("Destroy the Atreides.")
|
||||
AllyWithMercenaries = player.AddSecondaryObjective("Persuade the Mercenaries to fight with\nHouse Harkonnen.")
|
||||
KillHarkonnen1 = ordos.AddPrimaryObjective("Kill all Harkonnen units.")
|
||||
KillHarkonnen2 = atreides_enemy.AddPrimaryObjective("Kill all Harkonnen units.")
|
||||
KillOrdos = AddPrimaryObjective(player, "destroy-ordos")
|
||||
KillAtreides = AddSecondaryObjective(player, "destroy-atreides")
|
||||
AllyWithMercenaries = AddSecondaryObjective(player, "ally-mercenaries")
|
||||
KillHarkonnen1 = AddPrimaryObjective(ordos, "")
|
||||
KillHarkonnen2 = AddPrimaryObjective(atreides_enemy, "")
|
||||
|
||||
Camera.Position = HMCV.CenterPosition
|
||||
OrdosAttackLocation = HMCV.Location
|
||||
@@ -280,7 +280,7 @@ WorldLoaded = function()
|
||||
|
||||
Trigger.OnCapture(MHeavyFactory, function()
|
||||
player.MarkCompletedObjective(AllyWithMercenaries)
|
||||
Media.DisplayMessage("Leader Captured. Mercenaries have been persuaded to fight with House Harkonnen.", "Mentat")
|
||||
Media.DisplayMessage(UserInterface.Translate("mercenary-leader-captured-allied"), Mentat)
|
||||
MercenaryAttackLocation = MercenaryAttackPoint.Location
|
||||
|
||||
ChangeOwner(mercenary_enemy, mercenary_ally)
|
||||
@@ -296,7 +296,7 @@ WorldLoaded = function()
|
||||
end)
|
||||
|
||||
Trigger.OnKilledOrCaptured(OPalace, function()
|
||||
Media.DisplayMessage("We cannot stand against the Harkonnen. We must become neutral.", "Atreides Commander")
|
||||
Media.DisplayMessage(UserInterface.Translate("can-not-stand-harkonnen-must-become-neutral"), UserInterface.Translate("atreides-commander"))
|
||||
|
||||
ChangeOwner(atreides_enemy, atreides_neutral)
|
||||
DefendAndRepairBase(atreides_neutral, AtreidesBase, 0.75, AttackGroupSize[Difficulty])
|
||||
|
||||
@@ -654,3 +654,5 @@ Actors:
|
||||
Location: 53,38
|
||||
|
||||
Rules: d2k|rules/campaign-rules.yaml, d2k|rules/campaign-tooltips.yaml, d2k|rules/campaign-palettes.yaml, rules.yaml
|
||||
|
||||
Translations: d2k|languages/lua/en.ftl
|
||||
|
||||
@@ -220,12 +220,12 @@ Tick = function()
|
||||
end
|
||||
|
||||
if atreides_main.HasNoRequiredUnits() and atreides_small_1.HasNoRequiredUnits() and atreides_small_2.HasNoRequiredUnits() and not player.IsObjectiveCompleted(KillAtreides) then
|
||||
Media.DisplayMessage("The Atreides have been annihilated!", "Mentat")
|
||||
Media.DisplayMessage(UserInterface.Translate("atreides-annihilated"), Mentat)
|
||||
player.MarkCompletedObjective(KillAtreides)
|
||||
end
|
||||
|
||||
if corrino_main.HasNoRequiredUnits() and corrino_small.HasNoRequiredUnits() and not player.IsObjectiveCompleted(KillCorrino) then
|
||||
Media.DisplayMessage("The Emperor has been annihilated!", "Mentat")
|
||||
Media.DisplayMessage(UserInterface.Translate("emperor-annihilated"), Mentat)
|
||||
player.MarkCompletedObjective(KillCorrino)
|
||||
end
|
||||
|
||||
@@ -275,13 +275,13 @@ WorldLoaded = function()
|
||||
player = Player.GetPlayer("Harkonnen")
|
||||
|
||||
InitObjectives(player)
|
||||
KillAtreides = player.AddPrimaryObjective("Destroy the Atreides.")
|
||||
KillCorrino = player.AddPrimaryObjective("Destroy the Imperial Forces.")
|
||||
KillHarkonnen1 = atreides_main.AddPrimaryObjective("Kill all Harkonnen units.")
|
||||
KillHarkonnen2 = atreides_small_1.AddPrimaryObjective("Kill all Harkonnen units.")
|
||||
KillHarkonnen3 = atreides_small_2.AddPrimaryObjective("Kill all Harkonnen units.")
|
||||
KillHarkonnen4 = corrino_main.AddPrimaryObjective("Kill all Harkonnen units.")
|
||||
KillHarkonnen5 = corrino_small.AddPrimaryObjective("Kill all Harkonnen units.")
|
||||
KillAtreides = AddPrimaryObjective(player, "destroy-atreides")
|
||||
KillCorrino = AddPrimaryObjective(player, "destroy-imperial-forces")
|
||||
KillHarkonnen1 = AddPrimaryObjective(atreides_main, "")
|
||||
KillHarkonnen2 = AddPrimaryObjective(atreides_small_1, "")
|
||||
KillHarkonnen3 = AddPrimaryObjective(atreides_small_2, "")
|
||||
KillHarkonnen4 = AddPrimaryObjective(corrino_main, "")
|
||||
KillHarkonnen5 = AddPrimaryObjective(corrino_small, "")
|
||||
|
||||
Camera.Position = HMCV.CenterPosition
|
||||
AtreidesAttackLocation = HarkonnenRally.Location
|
||||
|
||||
@@ -1044,3 +1044,5 @@ Actors:
|
||||
Location: 2,13
|
||||
|
||||
Rules: d2k|rules/campaign-rules.yaml, d2k|rules/campaign-tooltips.yaml, d2k|rules/campaign-palettes.yaml, rules.yaml
|
||||
|
||||
Translations: d2k|languages/lua/en.ftl
|
||||
|
||||
@@ -265,9 +265,8 @@ CheckSmugglerEnemies = function()
|
||||
end
|
||||
|
||||
if attacker.Owner == player and not message_check then
|
||||
|
||||
message_check = true
|
||||
Media.DisplayMessage("The Smugglers are now hostile!", "Mentat")
|
||||
Media.DisplayMessage(UserInterface.Translate("smugglers-now-hostile"), Mentat)
|
||||
end
|
||||
end)
|
||||
end)
|
||||
@@ -282,17 +281,17 @@ Tick = function()
|
||||
end
|
||||
|
||||
if atreides_main.HasNoRequiredUnits() and atreides_small.HasNoRequiredUnits() and not player.IsObjectiveCompleted(KillAtreides) then
|
||||
Media.DisplayMessage("The Atreides have been annihilated!", "Mentat")
|
||||
Media.DisplayMessage(UserInterface.Translate("atreides-annihilated"), Mentat)
|
||||
player.MarkCompletedObjective(KillAtreides)
|
||||
end
|
||||
|
||||
if corrino_main.HasNoRequiredUnits() and corrino_small.HasNoRequiredUnits() and not player.IsObjectiveCompleted(KillCorrino) then
|
||||
Media.DisplayMessage("The Emperor has been annihilated!", "Mentat")
|
||||
Media.DisplayMessage(UserInterface.Translate("emperor-annihilated"), Mentat)
|
||||
player.MarkCompletedObjective(KillCorrino)
|
||||
end
|
||||
|
||||
if smuggler_neutral.HasNoRequiredUnits() and smuggler_harkonnen.HasNoRequiredUnits() and smuggler_ai.HasNoRequiredUnits() and smuggler_both.HasNoRequiredUnits() and not SmugglersKilled then
|
||||
Media.DisplayMessage("The Smugglers have been annihilated!", "Mentat")
|
||||
Media.DisplayMessage(UserInterface.Translate("smugglers-annihilated"), Mentat)
|
||||
SmugglersKilled = true
|
||||
end
|
||||
|
||||
@@ -350,13 +349,13 @@ WorldLoaded = function()
|
||||
player = Player.GetPlayer("Harkonnen")
|
||||
|
||||
InitObjectives(player)
|
||||
DeployMCV = player.AddSecondaryObjective("Build an MCV and deploy it into a Construction Yard.")
|
||||
KillAtreides = player.AddPrimaryObjective("Destroy the Atreides.")
|
||||
KillCorrino = player.AddPrimaryObjective("Destroy the Imperial Forces.")
|
||||
KillHarkonnen1 = atreides_main.AddPrimaryObjective("Kill all Harkonnen units.")
|
||||
KillHarkonnen2 = atreides_small.AddPrimaryObjective("Kill all Harkonnen units.")
|
||||
KillHarkonnen3 = corrino_main.AddPrimaryObjective("Kill all Harkonnen units.")
|
||||
KillHarkonnen4 = corrino_small.AddPrimaryObjective("Kill all Harkonnen units.")
|
||||
DeployMCV = AddSecondaryObjective(player, "build-deploy-mcv")
|
||||
KillAtreides = AddPrimaryObjective(player, "destroy-atreides")
|
||||
KillCorrino = AddPrimaryObjective(player, "destroy-imperial-forces")
|
||||
KillHarkonnen1 = AddPrimaryObjective(atreides_main, "")
|
||||
KillHarkonnen2 = AddPrimaryObjective(atreides_small, "")
|
||||
KillHarkonnen3 = AddPrimaryObjective(corrino_main, "")
|
||||
KillHarkonnen4 = AddPrimaryObjective(corrino_small, "")
|
||||
|
||||
-- Wait for carryall drop
|
||||
Trigger.AfterDelay(DateTime.Seconds(10), function()
|
||||
|
||||
@@ -1007,3 +1007,5 @@ Actors:
|
||||
Location: 90,48
|
||||
|
||||
Rules: d2k|rules/campaign-rules.yaml, d2k|rules/campaign-tooltips.yaml, d2k|rules/campaign-palettes.yaml, rules.yaml
|
||||
|
||||
Translations: d2k|languages/lua/en.ftl
|
||||
|
||||
@@ -103,3 +103,5 @@ Actors:
|
||||
Location: 29,15
|
||||
|
||||
Rules: d2k|rules/campaign-rules.yaml, d2k|rules/campaign-tooltips.yaml, d2k|rules/campaign-palettes.yaml, rules.yaml
|
||||
|
||||
Translations: d2k|languages/lua/en.ftl
|
||||
|
||||
@@ -53,12 +53,13 @@ OrdosEntryPath = { OrdosWaypoint.Location, OrdosRally.Location }
|
||||
|
||||
Messages =
|
||||
{
|
||||
"Build a concrete foundation before placing your buildings.",
|
||||
"Build a Wind Trap for power.",
|
||||
"Build a Refinery to collect Spice.",
|
||||
"Build a Silo to store additional Spice."
|
||||
UserInterface.Translate("build-concrete"),
|
||||
UserInterface.Translate("build-windtrap"),
|
||||
UserInterface.Translate("build-refinery"),
|
||||
UserInterface.Translate("build-silo")
|
||||
}
|
||||
|
||||
CachedResources = -1
|
||||
Tick = function()
|
||||
if HarkonnenArrived and harkonnen.HasNoRequiredUnits() then
|
||||
player.MarkCompletedObjective(KillHarkonnen)
|
||||
@@ -71,21 +72,26 @@ Tick = function()
|
||||
-- player has no Wind Trap
|
||||
if (player.PowerProvided <= 20 or player.PowerState ~= "Normal") and DateTime.GameTime % DateTime.Seconds(32) == 0 then
|
||||
HasPower = false
|
||||
Media.DisplayMessage(Messages[2], "Mentat")
|
||||
Media.DisplayMessage(Messages[2], Mentat)
|
||||
else
|
||||
HasPower = true
|
||||
end
|
||||
|
||||
-- player has no Refinery and no Silos
|
||||
if HasPower and player.ResourceCapacity == 0 and DateTime.GameTime % DateTime.Seconds(32) == 0 then
|
||||
Media.DisplayMessage(Messages[3], "Mentat")
|
||||
Media.DisplayMessage(Messages[3], Mentat)
|
||||
end
|
||||
|
||||
if HasPower and player.Resources > player.ResourceCapacity * 0.8 and DateTime.GameTime % DateTime.Seconds(32) == 0 then
|
||||
Media.DisplayMessage(Messages[4], "Mentat")
|
||||
Media.DisplayMessage(Messages[4], Mentat)
|
||||
end
|
||||
|
||||
UserInterface.SetMissionText("Harvested resources: " .. player.Resources .. "/" .. SpiceToHarvest, player.Color)
|
||||
if player.Resources ~= CachedResources then
|
||||
local parameters = { ["harvested"] = player.Resources, ["goal"] = SpiceToHarvest }
|
||||
local harvestedResources = UserInterface.Translate("harvested-resources", parameters)
|
||||
UserInterface.SetMissionText(harvestedResources)
|
||||
CachedResources = player.Resources
|
||||
end
|
||||
end
|
||||
|
||||
WorldLoaded = function()
|
||||
@@ -95,14 +101,15 @@ WorldLoaded = function()
|
||||
SpiceToHarvest = ToHarvest[Difficulty]
|
||||
|
||||
InitObjectives(player)
|
||||
KillOrdos = harkonnen.AddPrimaryObjective("Kill all Ordos units.")
|
||||
GatherSpice = player.AddPrimaryObjective("Harvest " .. tostring(SpiceToHarvest) .. " Solaris worth of Spice.")
|
||||
KillHarkonnen = player.AddSecondaryObjective("Eliminate all Harkonnen units and reinforcements\nin the area.")
|
||||
KillOrdos = AddPrimaryObjective(harkonnen, "")
|
||||
local harvestSpice = UserInterface.Translate("harvest-spice", { ["spice"] = SpiceToHarvest })
|
||||
GatherSpice = AddPrimaryObjective(player, harvestSpice)
|
||||
KillHarkonnen = AddSecondaryObjective(player, "eliminate-harkonnen-units-reinforcements")
|
||||
|
||||
local checkResourceCapacity = function()
|
||||
Trigger.AfterDelay(0, function()
|
||||
if player.ResourceCapacity < SpiceToHarvest then
|
||||
Media.DisplayMessage("We don't have enough silo space to store the required amount of Spice!", "Mentat")
|
||||
Media.DisplayMessage(UserInterface.Translate("not-enough-silos"), Mentat)
|
||||
Trigger.AfterDelay(DateTime.Seconds(3), function()
|
||||
harkonnen.MarkCompletedObjective(KillAtreides)
|
||||
end)
|
||||
@@ -134,7 +141,7 @@ WorldLoaded = function()
|
||||
end
|
||||
end)
|
||||
|
||||
Media.DisplayMessage(Messages[1], "Mentat")
|
||||
Media.DisplayMessage(Messages[1], Mentat)
|
||||
|
||||
Trigger.AfterDelay(DateTime.Seconds(25), function()
|
||||
Media.PlaySpeechNotification(player, "Reinforce")
|
||||
|
||||
@@ -103,3 +103,5 @@ Actors:
|
||||
Location: 24,2
|
||||
|
||||
Rules: d2k|rules/campaign-rules.yaml, d2k|rules/campaign-tooltips.yaml, d2k|rules/campaign-palettes.yaml, rules.yaml
|
||||
|
||||
Translations: d2k|languages/lua/en.ftl
|
||||
|
||||
@@ -53,12 +53,13 @@ OrdosEntryPath = { OrdosWaypoint.Location, OrdosRally.Location }
|
||||
|
||||
Messages =
|
||||
{
|
||||
"Build a concrete foundation before placing your buildings.",
|
||||
"Build a Wind Trap for power.",
|
||||
"Build a Refinery to collect Spice.",
|
||||
"Build a Silo to store additional Spice."
|
||||
UserInterface.Translate("build-concrete"),
|
||||
UserInterface.Translate("build-windtrap"),
|
||||
UserInterface.Translate("build-refinery"),
|
||||
UserInterface.Translate("build-silo")
|
||||
}
|
||||
|
||||
CachedResources = -1
|
||||
Tick = function()
|
||||
if HarkonnenArrived and harkonnen.HasNoRequiredUnits() then
|
||||
player.MarkCompletedObjective(KillHarkonnen)
|
||||
@@ -71,21 +72,26 @@ Tick = function()
|
||||
-- player has no Wind Trap
|
||||
if (player.PowerProvided <= 20 or player.PowerState ~= "Normal") and DateTime.GameTime % DateTime.Seconds(32) == 0 then
|
||||
HasPower = false
|
||||
Media.DisplayMessage(Messages[2], "Mentat")
|
||||
Media.DisplayMessage(Messages[2], Mentat)
|
||||
else
|
||||
HasPower = true
|
||||
end
|
||||
|
||||
-- player has no Refinery and no Silos
|
||||
if HasPower and player.ResourceCapacity == 0 and DateTime.GameTime % DateTime.Seconds(32) == 0 then
|
||||
Media.DisplayMessage(Messages[3], "Mentat")
|
||||
Media.DisplayMessage(Messages[3], Mentat)
|
||||
end
|
||||
|
||||
if HasPower and player.Resources > player.ResourceCapacity * 0.8 and DateTime.GameTime % DateTime.Seconds(32) == 0 then
|
||||
Media.DisplayMessage(Messages[4], "Mentat")
|
||||
Media.DisplayMessage(Messages[4], Mentat)
|
||||
end
|
||||
|
||||
UserInterface.SetMissionText("Harvested resources: " .. player.Resources .. "/" .. SpiceToHarvest, player.Color)
|
||||
if player.Resources ~= CachedResources then
|
||||
local parameters = { ["harvested"] = player.Resources, ["goal"] = SpiceToHarvest }
|
||||
local harvestedResources = UserInterface.Translate("harvested-resources", parameters)
|
||||
UserInterface.SetMissionText(harvestedResources)
|
||||
CachedResources = player.Resources
|
||||
end
|
||||
end
|
||||
|
||||
WorldLoaded = function()
|
||||
@@ -95,16 +101,17 @@ WorldLoaded = function()
|
||||
SpiceToHarvest = ToHarvest[Difficulty]
|
||||
|
||||
InitObjectives(player)
|
||||
KillAtreides = harkonnen.AddPrimaryObjective("Kill all Ordos units.")
|
||||
GatherSpice = player.AddPrimaryObjective("Harvest " .. tostring(SpiceToHarvest) .. " Solaris worth of Spice.")
|
||||
KillHarkonnen = player.AddSecondaryObjective("Eliminate all Harkonnen units and reinforcements\nin the area.")
|
||||
KillOrdos = AddPrimaryObjective(harkonnen, "")
|
||||
local harvestSpice = UserInterface.Translate("harvest-spice", { ["spice"] = SpiceToHarvest })
|
||||
GatherSpice = AddPrimaryObjective(player, harvestSpice)
|
||||
KillHarkonnen = AddSecondaryObjective(player, "eliminate-harkonnen-units-reinforcements")
|
||||
|
||||
local checkResourceCapacity = function()
|
||||
Trigger.AfterDelay(0, function()
|
||||
if player.ResourceCapacity < SpiceToHarvest then
|
||||
Media.DisplayMessage("We don't have enough silo space to store the required amount of Spice!", "Mentat")
|
||||
Media.DisplayMessage(UserInterface.Translate("not-enough-silos"), Mentat)
|
||||
Trigger.AfterDelay(DateTime.Seconds(3), function()
|
||||
harkonnen.MarkCompletedObjective(KillAtreides)
|
||||
harkonnen.MarkCompletedObjective(KillOrdos)
|
||||
end)
|
||||
|
||||
return true
|
||||
@@ -122,10 +129,10 @@ WorldLoaded = function()
|
||||
local refs = Utils.Where(Map.ActorsInWorld, function(actor) return actor.Type == "refinery" and actor.Owner == player end)
|
||||
|
||||
if #refs == 0 then
|
||||
harkonnen.MarkCompletedObjective(KillAtreides)
|
||||
harkonnen.MarkCompletedObjective(KillOrdos)
|
||||
else
|
||||
Trigger.OnAllRemovedFromWorld(refs, function()
|
||||
harkonnen.MarkCompletedObjective(KillAtreides)
|
||||
harkonnen.MarkCompletedObjective(KillOrdos)
|
||||
end)
|
||||
|
||||
local silos = Utils.Where(Map.ActorsInWorld, function(actor) return actor.Type == "silo" and actor.Owner == player end)
|
||||
@@ -134,7 +141,7 @@ WorldLoaded = function()
|
||||
end
|
||||
end)
|
||||
|
||||
Media.DisplayMessage(Messages[1], "Mentat")
|
||||
Media.DisplayMessage(Messages[1], Mentat)
|
||||
|
||||
Trigger.AfterDelay(DateTime.Seconds(25), function()
|
||||
Media.PlaySpeechNotification(player, "Reinforce")
|
||||
|
||||
@@ -154,3 +154,5 @@ Actors:
|
||||
Location: 25,17
|
||||
|
||||
Rules: d2k|rules/campaign-rules.yaml, d2k|rules/campaign-tooltips.yaml, d2k|rules/campaign-palettes.yaml, rules.yaml
|
||||
|
||||
Translations: d2k|languages/lua/en.ftl
|
||||
|
||||
@@ -86,7 +86,7 @@ Tick = function()
|
||||
end
|
||||
|
||||
if harkonnen.HasNoRequiredUnits() and not player.IsObjectiveCompleted(KillHarkonnen) then
|
||||
Media.DisplayMessage("The Harkonnen have been annihilated!", "Mentat")
|
||||
Media.DisplayMessage(UserInterface.Translate("harkonnen-annihilated"), Mentat)
|
||||
player.MarkCompletedObjective(KillHarkonnen)
|
||||
end
|
||||
end
|
||||
@@ -96,8 +96,8 @@ WorldLoaded = function()
|
||||
player = Player.GetPlayer("Ordos")
|
||||
|
||||
InitObjectives(player)
|
||||
KillOrdos = harkonnen.AddPrimaryObjective("Kill all Ordos units.")
|
||||
KillHarkonnen = player.AddPrimaryObjective("Destroy all Harkonnen forces.")
|
||||
KillOrdos = AddPrimaryObjective(harkonnen, "")
|
||||
KillHarkonnen = AddPrimaryObjective(player, "destroy-harkonnen-forces")
|
||||
|
||||
Camera.Position = OConyard.CenterPosition
|
||||
|
||||
|
||||
@@ -139,3 +139,5 @@ Actors:
|
||||
Location: 9,8
|
||||
|
||||
Rules: d2k|rules/campaign-rules.yaml, d2k|rules/campaign-tooltips.yaml, d2k|rules/campaign-palettes.yaml, rules.yaml
|
||||
|
||||
Translations: d2k|languages/lua/en.ftl
|
||||
|
||||
@@ -70,7 +70,7 @@ Tick = function()
|
||||
end
|
||||
|
||||
if harkonnen.HasNoRequiredUnits() and not player.IsObjectiveCompleted(KillHarkonnen) then
|
||||
Media.DisplayMessage("The Harkonnen have been annihilated!", "Mentat")
|
||||
Media.DisplayMessage(UserInterface.Translate("harkonnen-annihilated"), Mentat)
|
||||
player.MarkCompletedObjective(KillHarkonnen)
|
||||
end
|
||||
end
|
||||
@@ -80,8 +80,8 @@ WorldLoaded = function()
|
||||
player = Player.GetPlayer("Ordos")
|
||||
|
||||
InitObjectives(player)
|
||||
KillOrdos = harkonnen.AddPrimaryObjective("Kill all Ordos units.")
|
||||
KillHarkonnen = player.AddPrimaryObjective("Destroy all Harkonnen forces.")
|
||||
KillOrdos = AddPrimaryObjective(harkonnen, "")
|
||||
KillHarkonnen = AddPrimaryObjective(player, "destroy-harkonnen-forces")
|
||||
|
||||
Camera.Position = OConyard.CenterPosition
|
||||
|
||||
|
||||
@@ -145,3 +145,5 @@ Actors:
|
||||
Location: 4,60
|
||||
|
||||
Rules: d2k|rules/campaign-rules.yaml, d2k|rules/campaign-tooltips.yaml, d2k|rules/campaign-palettes.yaml, rules.yaml
|
||||
|
||||
Translations: d2k|languages/lua/en.ftl
|
||||
|
||||
@@ -86,7 +86,7 @@ Tick = function()
|
||||
end
|
||||
|
||||
if harkonnen.HasNoRequiredUnits() and not player.IsObjectiveCompleted(KillHarkonnen) then
|
||||
Media.DisplayMessage("The Harkonnen have been annihilated!", "Mentat")
|
||||
Media.DisplayMessage(UserInterface.Translate("harkonnen-annihilated"), Mentat)
|
||||
player.MarkCompletedObjective(KillHarkonnen)
|
||||
end
|
||||
|
||||
@@ -100,7 +100,7 @@ Tick = function()
|
||||
end
|
||||
|
||||
if DateTime.GameTime % DateTime.Seconds(32) == 0 and (MessageCheck(1) or MessageCheck(2)) then
|
||||
Media.DisplayMessage("Upgrade barracks and light factory to produce more advanced units.", "Mentat")
|
||||
Media.DisplayMessage(UserInterface.Translate("upgrade-barracks-light-factory"), Mentat)
|
||||
end
|
||||
end
|
||||
|
||||
@@ -109,8 +109,8 @@ WorldLoaded = function()
|
||||
player = Player.GetPlayer("Ordos")
|
||||
|
||||
InitObjectives(player)
|
||||
KillOrdos = harkonnen.AddPrimaryObjective("Kill all Ordos units.")
|
||||
KillHarkonnen = player.AddPrimaryObjective("Eliminate all Harkonnen units and reinforcements\nin the area.")
|
||||
KillOrdos = AddPrimaryObjective(harkonnen, "")
|
||||
KillHarkonnen = AddPrimaryObjective(player, "eliminate-harkonnen-units-reinforcements")
|
||||
|
||||
Camera.Position = OConyard.CenterPosition
|
||||
|
||||
|
||||
@@ -256,3 +256,5 @@ Actors:
|
||||
Location: 2,20
|
||||
|
||||
Rules: d2k|rules/campaign-rules.yaml, d2k|rules/campaign-tooltips.yaml, d2k|rules/campaign-palettes.yaml, rules.yaml
|
||||
|
||||
Translations: d2k|languages/lua/en.ftl
|
||||
|
||||
@@ -123,7 +123,7 @@ Tick = function()
|
||||
end
|
||||
|
||||
if harkonnen.HasNoRequiredUnits() and not player.IsObjectiveCompleted(KillHarkonnen) then
|
||||
Media.DisplayMessage("The Harkonnen have been annihilated!", "Mentat")
|
||||
Media.DisplayMessage(UserInterface.Translate("harkonnen-annihilated"), Mentat)
|
||||
player.MarkCompletedObjective(KillHarkonnen)
|
||||
end
|
||||
|
||||
@@ -137,7 +137,7 @@ Tick = function()
|
||||
end
|
||||
|
||||
if DateTime.GameTime % DateTime.Seconds(32) == 0 and (MessageCheck(1) or MessageCheck(2)) then
|
||||
Media.DisplayMessage("Upgrade barracks and light factory to produce more advanced units.", "Mentat")
|
||||
Media.DisplayMessage(UserInterface.Translate("upgrade-barracks-light-factory"), Mentat)
|
||||
end
|
||||
end
|
||||
|
||||
@@ -146,8 +146,8 @@ WorldLoaded = function()
|
||||
player = Player.GetPlayer("Ordos")
|
||||
|
||||
InitObjectives(player)
|
||||
KillOrdos = harkonnen.AddPrimaryObjective("Kill all Ordos units.")
|
||||
KillHarkonnen = player.AddPrimaryObjective("Eliminate all Harkonnen units and reinforcements\nin the area.")
|
||||
KillOrdos = AddPrimaryObjective(harkonnen, "")
|
||||
KillHarkonnen = AddPrimaryObjective(player, "eliminate-harkonnen-units-reinforcements")
|
||||
|
||||
Camera.Position = OConyard.CenterPosition
|
||||
|
||||
|
||||
@@ -518,3 +518,5 @@ Actors:
|
||||
Location: 49,19
|
||||
|
||||
Rules: d2k|rules/campaign-rules.yaml, d2k|rules/campaign-tooltips.yaml, d2k|rules/campaign-palettes.yaml, rules.yaml
|
||||
|
||||
Translations: d2k|languages/lua/en.ftl
|
||||
|
||||
@@ -90,7 +90,7 @@ Tick = function()
|
||||
end
|
||||
|
||||
if harkonnen.HasNoRequiredUnits() and not player.IsObjectiveCompleted(KillHarkonnen) then
|
||||
Media.DisplayMessage("The Harkonnen have been annihilated!", "Mentat")
|
||||
Media.DisplayMessage(UserInterface.Translate("harkonnen-annihilated"), Mentat)
|
||||
player.MarkCompletedObjective(KillHarkonnen)
|
||||
end
|
||||
|
||||
@@ -106,11 +106,11 @@ WorldLoaded = function()
|
||||
player = Player.GetPlayer("Ordos")
|
||||
|
||||
InitObjectives(player)
|
||||
KillOrdosH = harkonnen.AddPrimaryObjective("Kill all Ordos units.")
|
||||
KillOrdosS = smuggler.AddSecondaryObjective("Kill all Ordos units.")
|
||||
DefendOutpost = smuggler.AddPrimaryObjective("Don't let the outpost to be captured or destroyed.")
|
||||
CaptureOutpost = player.AddPrimaryObjective("Capture the Smuggler Outpost.")
|
||||
KillHarkonnen = player.AddSecondaryObjective("Destroy the Harkonnen.")
|
||||
KillOrdosH = AddPrimaryObjective(harkonnen, "")
|
||||
KillOrdosS = AddSecondaryObjective(smuggler, "")
|
||||
DefendOutpost = AddPrimaryObjective(smuggler, "outpost-not-captured-destroyed")
|
||||
CaptureOutpost = AddPrimaryObjective(player, "capture-smuggler-outpost")
|
||||
KillHarkonnen = AddSecondaryObjective(player, "destroy-harkonnen")
|
||||
|
||||
SOutpost.GrantCondition("modified")
|
||||
|
||||
@@ -146,7 +146,7 @@ WorldLoaded = function()
|
||||
|
||||
if AttackNotifier <= 0 then
|
||||
AttackNotifier = DateTime.Seconds(10)
|
||||
Media.DisplayMessage("Don't destroy the Outpost!", "Mentat")
|
||||
Media.DisplayMessage(UserInterface.Translate("do-not-destroy-outpost"), Mentat)
|
||||
end
|
||||
end)
|
||||
|
||||
@@ -156,6 +156,6 @@ WorldLoaded = function()
|
||||
end)
|
||||
|
||||
Trigger.AfterDelay(HarkonnenAttackDelay[Difficulty], function()
|
||||
Media.DisplayMessage("WARNING: Large force approaching!", "Mentat")
|
||||
Media.DisplayMessage(UserInterface.Translate("warning-large-force-approaching"), Mentat)
|
||||
end)
|
||||
end
|
||||
|
||||
@@ -572,3 +572,5 @@ Actors:
|
||||
Location: 2,58
|
||||
|
||||
Rules: d2k|rules/campaign-rules.yaml, d2k|rules/campaign-tooltips.yaml, d2k|rules/campaign-palettes.yaml, rules.yaml
|
||||
|
||||
Translations: d2k|languages/lua/en.ftl
|
||||
|
||||
@@ -108,6 +108,7 @@ CheckHarvester = function(house)
|
||||
end
|
||||
end
|
||||
|
||||
CachedResources = -1
|
||||
Tick = function()
|
||||
if player.Resources > SpiceToHarvest - 1 then
|
||||
player.MarkCompletedObjective(GatherSpice)
|
||||
@@ -121,7 +122,7 @@ Tick = function()
|
||||
end
|
||||
|
||||
if atreides_main.HasNoRequiredUnits() and atreides_small_1.HasNoRequiredUnits() and atreides_small_2.HasNoRequiredUnits() and atreides_small_3.HasNoRequiredUnits() and not player.IsObjectiveCompleted(KillAtreides) then
|
||||
Media.DisplayMessage("The Atreides have been annihilated!", "Mentat")
|
||||
Media.DisplayMessage(UserInterface.Translate("atreides-annihilated"), Mentat)
|
||||
player.MarkCompletedObjective(KillAtreides)
|
||||
end
|
||||
|
||||
@@ -130,7 +131,12 @@ Tick = function()
|
||||
end
|
||||
|
||||
if player.IsObjectiveCompleted(CaptureStarport) then
|
||||
UserInterface.SetMissionText("Harvested resources: " .. player.Resources .. "/" .. SpiceToHarvest, player.Color)
|
||||
if player.Resources ~= CachedResources then
|
||||
local parameters = { ["harvested"] = player.Resources, ["goal"] = SpiceToHarvest }
|
||||
local harvestedResources = UserInterface.Translate("harvested-resources", parameters)
|
||||
UserInterface.SetMissionText(harvestedResources)
|
||||
CachedResources = player.Resources
|
||||
end
|
||||
end
|
||||
|
||||
CheckHarvester(atreides_main)
|
||||
@@ -147,13 +153,14 @@ WorldLoaded = function()
|
||||
SpiceToHarvest = ToHarvest[Difficulty]
|
||||
|
||||
InitObjectives(player)
|
||||
KillOrdos1 = atreides_main.AddPrimaryObjective("Kill all Ordos units.")
|
||||
KillOrdos2 = atreides_small_1.AddPrimaryObjective("Kill all Ordos units.")
|
||||
KillOrdos3 = atreides_small_2.AddPrimaryObjective("Kill all Ordos units.")
|
||||
KillOrdos4 = atreides_small_3.AddPrimaryObjective("Kill all Ordos units.")
|
||||
CaptureStarport = player.AddPrimaryObjective("Capture the Atreides Starport and establish a base.")
|
||||
GatherSpice = player.AddPrimaryObjective("Harvest " .. tostring(SpiceToHarvest) .. " Solaris worth of Spice.")
|
||||
KillAtreides = player.AddSecondaryObjective("Destroy the Atreides.")
|
||||
KillOrdos1 = AddPrimaryObjective(atreides_main, "")
|
||||
KillOrdos2 = AddPrimaryObjective(atreides_small_1, "")
|
||||
KillOrdos3 = AddPrimaryObjective(atreides_small_2, "")
|
||||
KillOrdos4 = AddPrimaryObjective(atreides_small_3, "")
|
||||
CaptureStarport = AddPrimaryObjective(player, "capture-atreides-starport-establish-base")
|
||||
local harvestSpice = UserInterface.Translate("harvest-spice", { ["spice"] = SpiceToHarvest })
|
||||
GatherSpice = AddPrimaryObjective(player, harvestSpice)
|
||||
KillAtreides = AddSecondaryObjective(player, "destroy-atreides")
|
||||
|
||||
Camera.Position = OEngi1.CenterPosition
|
||||
AtreidesAttackLocation = OEngi1.Location
|
||||
|
||||
@@ -576,3 +576,5 @@ Actors:
|
||||
Location: 34,2
|
||||
|
||||
Rules: d2k|rules/campaign-rules.yaml, d2k|rules/campaign-tooltips.yaml, d2k|rules/campaign-palettes.yaml, rules.yaml
|
||||
|
||||
Translations: d2k|languages/lua/en.ftl
|
||||
|
||||
@@ -141,6 +141,7 @@ ContrabandTimes =
|
||||
hard = DateTime.Minutes(7)
|
||||
}
|
||||
|
||||
IxianReinforcementsHaveArrived = UserInterface.Translate("ixian-reinforcements-arrived")
|
||||
SendContraband = function()
|
||||
Media.PlaySpeechNotification(player, "Reinforce")
|
||||
|
||||
@@ -150,7 +151,7 @@ SendContraband = function()
|
||||
c = HSLColor.White
|
||||
end
|
||||
|
||||
Trigger.AfterDelay(DateTime.Seconds(i), function() UserInterface.SetMissionText("Ixian reinforcements have arrived!", c) end)
|
||||
Trigger.AfterDelay(DateTime.Seconds(i), function() UserInterface.SetMissionText(IxianReinforcementsHaveArrived, c) end)
|
||||
end
|
||||
Trigger.AfterDelay(DateTime.Seconds(6), function()
|
||||
TimerTicks = ContrabandTimes[Difficulty]
|
||||
@@ -180,7 +181,7 @@ end
|
||||
|
||||
Tick = function()
|
||||
if not player.IsObjectiveCompleted(KillAtreides) and atreides.HasNoRequiredUnits() then
|
||||
Media.DisplayMessage("The Atreides have been annihilated!", "Mentat")
|
||||
Media.DisplayMessage(UserInterface.Translate("atreides-annihilated"), Mentat)
|
||||
player.MarkCompletedObjective(KillAtreides)
|
||||
DestroyCarryalls(atreides)
|
||||
|
||||
@@ -190,7 +191,7 @@ Tick = function()
|
||||
end
|
||||
|
||||
if not player.IsObjectiveCompleted(KillHarkonnen) and harkonnen.HasNoRequiredUnits() then
|
||||
Media.DisplayMessage("The Harkonnen have been annihilated!", "Mentat")
|
||||
Media.DisplayMessage(UserInterface.Translate("harkonnen-annihilated"), Mentat)
|
||||
player.MarkCompletedObjective(KillHarkonnen)
|
||||
DestroyCarryalls(harkonnen)
|
||||
|
||||
@@ -204,18 +205,19 @@ Tick = function()
|
||||
|
||||
if TimerTicks == 0 then
|
||||
if not FirstIxiansArrived then
|
||||
Media.DisplayMessage("Deliveries beginning to arrive. Massive reinforcements expected!", "Mentat")
|
||||
Media.DisplayMessage(UserInterface.Translate("deliveries-arriving-massive-reinforcements"), Mentat)
|
||||
end
|
||||
|
||||
FirstIxiansArrived = true
|
||||
SendContraband()
|
||||
else
|
||||
local text = "Initial"
|
||||
elseif (TimerTicks % DateTime.Seconds(1)) == 0 then
|
||||
local time = { ["time"] = Utils.FormatTime(TimerTicks) }
|
||||
local reinforcementsText = UserInterface.Translate("initial-reinforcements-arrive-in", time)
|
||||
if FirstIxiansArrived then
|
||||
text = "Additional"
|
||||
reinforcementsText = UserInterface.Translate("additional-reinforcements-arrive-in", time)
|
||||
end
|
||||
|
||||
UserInterface.SetMissionText(text .. " reinforcements will arrive in " .. Utils.FormatTime(TimerTicks), player.Color)
|
||||
UserInterface.SetMissionText(reinforcementsText, player.Color)
|
||||
end
|
||||
end
|
||||
|
||||
@@ -229,9 +231,9 @@ WorldLoaded = function()
|
||||
player = Player.GetPlayer("Ordos")
|
||||
|
||||
InitObjectives(player)
|
||||
GuardStarport = player.AddObjective("Defend the Starport.")
|
||||
KillAtreides = player.AddObjective("Destroy the Atreides.")
|
||||
KillHarkonnen = player.AddObjective("Destroy the Harkonnen.")
|
||||
GuardStarport = AddPrimaryObjective(player, "defend-starport")
|
||||
KillAtreides = AddPrimaryObjective(player, "destroy-atreides")
|
||||
KillHarkonnen = AddPrimaryObjective(player, "destroy-harkonnen")
|
||||
|
||||
Camera.Position = OConyard.CenterPosition
|
||||
EnemyAttackLocations = { OConyard.Location, OStarport.Location }
|
||||
@@ -242,7 +244,8 @@ WorldLoaded = function()
|
||||
|
||||
Trigger.AfterDelay(DateTime.Seconds(2), function()
|
||||
TimerTicks = InitialContrabandTimes[Difficulty]
|
||||
Media.DisplayMessage("The first batch of Ixian reinforcements will arrive in " .. Utils.FormatTime(TimerTicks) .. ".", "Mentat")
|
||||
local time = { ["time"] = Utils.FormatTime(TimerTicks) }
|
||||
Media.DisplayMessage(UserInterface.Translate("ixian-reinforcements-in", time), Mentat)
|
||||
end)
|
||||
|
||||
Hunt(atreides)
|
||||
@@ -257,7 +260,7 @@ WorldLoaded = function()
|
||||
IdleHunt(unit)
|
||||
end
|
||||
local announcementFunction = function()
|
||||
Media.DisplayMessage("Enemy reinforcements have arrived.", "Mentat")
|
||||
Media.DisplayMessage(UserInterface.Translate("enemy-reinforcements-arrived"), Mentat)
|
||||
end
|
||||
|
||||
SendCarryallReinforcements(atreides, 0, AtreidesAttackWaves[Difficulty], EnemyAttackDelay[Difficulty], atreidesPath, AtreidesReinforcements[Difficulty], atreidesCondition, huntFunction, announcementFunction)
|
||||
|
||||
@@ -10,15 +10,11 @@
|
||||
Difficulty = Map.LobbyOption("difficulty")
|
||||
|
||||
InitObjectives = function(player)
|
||||
Trigger.OnObjectiveAdded(player, function(p, id)
|
||||
Media.DisplayMessage(p.GetObjectiveDescription(id), "New " .. string.lower(p.GetObjectiveType(id)) .. " objective")
|
||||
end)
|
||||
|
||||
Trigger.OnObjectiveCompleted(player, function(p, id)
|
||||
Media.DisplayMessage(p.GetObjectiveDescription(id), "Objective completed")
|
||||
Media.DisplayMessage(p.GetObjectiveDescription(id), UserInterface.Translate("objective-completed"))
|
||||
end)
|
||||
Trigger.OnObjectiveFailed(player, function(p, id)
|
||||
Media.DisplayMessage(p.GetObjectiveDescription(id), "Objective failed")
|
||||
Media.DisplayMessage(p.GetObjectiveDescription(id), UserInterface.Translate("objective-failed"))
|
||||
end)
|
||||
|
||||
Trigger.OnPlayerLost(player, function()
|
||||
@@ -33,6 +29,8 @@ InitObjectives = function(player)
|
||||
end)
|
||||
end
|
||||
|
||||
Mentat = UserInterface.Translate("mentat")
|
||||
|
||||
SendCarryallReinforcements = function(player, currentWave, totalWaves, delay, pathFunction, unitTypes, customCondition, customHuntFunction, announcementFunction)
|
||||
Trigger.AfterDelay(delay, function()
|
||||
if customCondition and customCondition() then
|
||||
|
||||
Reference in New Issue
Block a user