Files
SoaFE/DATA/SCRIPTS/AI/HUTTSADVANCETECHPLAN.LUA
2026-02-28 14:00:45 -06:00

70 lines
2.6 KiB
Lua

--/////////////////////////////////////////////////////////////////////////////////////////////////
-- (c) Galyana's Ultimate Empire at War Modifications
--
-- ****** *** *** ************ *** ***
-- * * * * * * * *
-- * * * * * * *
-- * * * * * * *
-- * * * * * **** * * *
-- * * * ****** * * * *
-- * **** * * * * * * * *** *
-- * * * * * * * * * *
-- * * * * * * * * * *
-- * * * * * * * ** * * *
-- ****** ****** ************ **** ** *******
--/////////////////////////////////////////////////////////////////////////////////////////////////
-- C O N F I D E N T I A L S O U R C E C O D E -- D O N O T D I S T R I B U T E
--/////////////////////////////////////////////////////////////////////////////////////////////////
--
-- File: GUEaW/Data/Scripts/AI/HuttsAdvanceTechPlan.LUA
--
-- Original Editor: Giovanni Galyana
--
-- Final Edit By: Giovanni Galyana
--
-- Date: 31 May, 2018
--
-- Revisions: 0
--
--/////////////////////////////////////////////////////////////////////////////////////////////////
require("pgevents")
function Definitions()
DebugMessage("%s -- In Definitions", tostring(Script))
Category = "Advance_Tech_Hutts"
IgnoreTarget = true
TaskForce = {
{
"TechForce",
"Hutt_Tech_2 | Hutt_Tech_3 | Hutt_Tech_4 | Hutt_Tech_5 = 1"
}
}
DebugMessage("%s -- Done Definitions", tostring(Script))
end
function TechForce_Thread()
DebugMessage("%s -- In TechForce_Thread.", tostring(Script))
-- Ensure that all goal feasability will be reevaluated based on the new production budgetting conditions
-- (production underway that is already paid for and remains affordable under new budgets should continue)
Purge_Goals(PlayerObject)
TechForce.Set_As_Goal_System_Removable(false)
Sleep(1)
BlockOnCommand(TechForce.Produce_Force())
TechForce.Set_Plan_Result(true)
DebugMessage("%s -- TechForce done!", tostring(Script));
ScriptExit()
end
function TechForce_Production_Failed(tf, failed_object_type)
DebugMessage("%s -- Abandonning plan owing to production failure.", tostring(Script))
ScriptExit()
end