From db4554acec55b6c3391d57302d4611dcd94e7572 Mon Sep 17 00:00:00 2001 From: abc013 Date: Fri, 24 Feb 2017 16:03:39 +0100 Subject: [PATCH] Make the AI only build submarines if the player has a shipyard --- mods/ra/maps/allies-06a/allies06a-AI.lua | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/mods/ra/maps/allies-06a/allies06a-AI.lua b/mods/ra/maps/allies-06a/allies06a-AI.lua index d5a8c9f1a8..a0beba1ac6 100644 --- a/mods/ra/maps/allies-06a/allies06a-AI.lua +++ b/mods/ra/maps/allies-06a/allies06a-AI.lua @@ -107,6 +107,13 @@ ProduceVehicles = function() end ProduceNaval = function() + if not shouldProduce and #Utils.Where(Map.ActorsInWorld, function(self) return self.Owner == player and self.Type == "syrd" end) < 1 then + Trigger.AfterDelay(DateTime.Minutes(1), ProduceNaval) + return + end + + shouldProduce = true + if SubPen.IsDead or SubPen.Owner ~= ussr then return end