From 5ed3f55ed2bcd94d7f978317938a814f4c2d7552 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matthias=20Mail=C3=A4nder?= Date: Sun, 10 Oct 2021 22:15:17 +0200 Subject: [PATCH] Use global idle hunt. --- mods/d2k/maps/shellmap/d2k-shellmap.lua | 2 -- mods/d2k/maps/shellmap/rules.yaml | 2 +- mods/d2k/scripts/campaign.lua | 6 ------ mods/ra/maps/soviet-10/soviet10.lua | 1 - 4 files changed, 1 insertion(+), 10 deletions(-) diff --git a/mods/d2k/maps/shellmap/d2k-shellmap.lua b/mods/d2k/maps/shellmap/d2k-shellmap.lua index 84e6bda825..94ff0e624d 100644 --- a/mods/d2k/maps/shellmap/d2k-shellmap.lua +++ b/mods/d2k/maps/shellmap/d2k-shellmap.lua @@ -63,8 +63,6 @@ OrdCarryHarvWaypoints = { ord_harvcarry_2.Location, ord_harvcarry_1.Location } CorCarryHarvWaypoints = { cor_harvcarry_2.Location, cor_harvcarry_1.Location } SmgCarryHarvWaypoints = { smg_harvcarry_2.Location, smg_harvcarry_1.Location } -IdleHunt = function(unit) if not unit.IsDead then Trigger.OnIdle(unit, unit.Hunt) end end - Produce = function(house, units) if HoldProduction[house.Name] then Trigger.AfterDelay(DateTime.Minutes(1), function() Produce(house, units) end) diff --git a/mods/d2k/maps/shellmap/rules.yaml b/mods/d2k/maps/shellmap/rules.yaml index 8839acab6b..9f175ad599 100644 --- a/mods/d2k/maps/shellmap/rules.yaml +++ b/mods/d2k/maps/shellmap/rules.yaml @@ -17,7 +17,7 @@ World: AllowMuteBackgroundMusic: true DisableWorldSounds: true LuaScript: - Scripts: d2k-shellmap.lua + Scripts: d2k-shellmap.lua, utils.lua ^ExistsInWorld: -GivesExperience: diff --git a/mods/d2k/scripts/campaign.lua b/mods/d2k/scripts/campaign.lua index c1d7548cb3..12224a7508 100644 --- a/mods/d2k/scripts/campaign.lua +++ b/mods/d2k/scripts/campaign.lua @@ -9,12 +9,6 @@ Difficulty = Map.LobbyOption("difficulty") -IdleHunt = function(actor) - if actor.HasProperty("Hunt") and not actor.IsDead then - Trigger.OnIdle(actor, actor.Hunt) - end -end - InitObjectives = function(player) Trigger.OnObjectiveAdded(player, function(p, id) Media.DisplayMessage(p.GetObjectiveDescription(id), "New " .. string.lower(p.GetObjectiveType(id)) .. " objective") diff --git a/mods/ra/maps/soviet-10/soviet10.lua b/mods/ra/maps/soviet-10/soviet10.lua index bb77883d2c..cce676c652 100644 --- a/mods/ra/maps/soviet-10/soviet10.lua +++ b/mods/ra/maps/soviet-10/soviet10.lua @@ -248,7 +248,6 @@ RunForIt = function() end) end -IdleHunt = function(actor) if not actor.IsDead then Trigger.OnIdle(actor, actor.Hunt) end end SendHunters = function() Media.PlaySpeechNotification(USSR, "AlliedForcesApproaching") local Hunters1 = Reinforcements.Reinforce(Greece, HunterTeam, { ConvoyEntry.Location, TrucksStop.Location })