From 4190314d24c8e6da9878f0b9e8ddcf7b8d5ae2be Mon Sep 17 00:00:00 2001 From: Allanis Date: Wed, 16 Oct 2013 23:30:51 +0100 Subject: [PATCH] [Add] Empire ai now properly jumps. --- scripts/ai/empire.lua | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/scripts/ai/empire.lua b/scripts/ai/empire.lua index 4bf029d..8db8a34 100644 --- a/scripts/ai/empire.lua +++ b/scripts/ai/empire.lua @@ -10,7 +10,13 @@ function control() enemy = ai.getenemy() if task ~= "attack" and enemy ~= nil then ai.hostile(enemy) - ai.pushtask(0, "attack", enemy) + ai.pushtask(0, "attack", enemy) + + -- Enter hyperspace if possible. + elseif task == "hyperspace" then + ai.hyperspace() -- Try to hyperspace. + + -- Get new task. elseif task == "none" then planet = ai.landplanet() -- Planet needs to exist..