Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Factor out the campaign elements of the base AI #4923

Merged
merged 3 commits into from
May 18, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion engine/Sim.lua
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
---@alias Task table
---@alias CSimSoundManager any
---@alias EconomyEvent moho.EconomyEvent
---@alias AIPersonality string
---@alias ArmyPlans any

---@alias Faction
Expand Down
2 changes: 1 addition & 1 deletion engine/Sim/CAiBrain.lua
Original file line number Diff line number Diff line change
Expand Up @@ -308,7 +308,7 @@ function CAiBrain:GetNumUnitsAroundPoint(category, position, radius, alliance)
end

--- Return the personality for this brain to use.
-- @return AIPersonalityTemplate from aipersonality.lua
---@return AIPersonality
function CAiBrain:GetPersonality()
end

Expand Down
29 changes: 29 additions & 0 deletions lua/aibrain.lua
Original file line number Diff line number Diff line change
Expand Up @@ -538,6 +538,8 @@ local CategoriesDummyUnit = categories.DUMMYUNIT

---@class AIBrain: AIBrainHQComponent, AIBrainStatisticsComponent, AIBrainJammerComponent, AIBrainEnergyComponent, moho.aibrain_methods
---@field AI boolean
---@field Name string # Army name
---@field Nickname string # Player / AI / character name
---@field Status BrainState
---@field Human boolean
---@field Civilian boolean
Expand Down Expand Up @@ -1420,4 +1422,31 @@ AIBrain = Class(AIBrainHQComponent, AIBrainStatisticsComponent, AIBrainJammerCom
---@param result AIResult
SetResult = function(self, result)
end,

----------------------------------------------------------------------------------------
--- legacy functionality
---
--- All functions below solely exist because the code is too tightly coupled. We can't
--- remove them without drastically changing how the code base works. We can't do that
--- because it would break mod compatibility

---@deprecated
---@param self AIBrain
SetConstantEvaluate = function(self)
end,

---@deprecated
---@param self AIBrain
InitializeSkirmishSystems = function(self)
end,

---@deprecated
---@param self AIBrain
ForceManagerSort = function(self)
end,

---@deprecated
---@param self AIBrain
InitializePlatoonBuildManager = function(self)
end,
}
Loading