fa
fa copied to clipboard
Track differences between Engine documentation and Moho
Classes
The engine documentation for classes is pretty good right now-- if it's in /engine/Sim/*
it's generally sim-side only, if it's in /engine/User/*
, user-side, and /engine/Core/*
for both. It's not quite perfect though.
Core
Core
- Blueprints (currently in Sim)
- ~~moho.EntityCategory (pending creation)~~ merged
- ~~moho.sound_methods (pending transfer from Sim)~~ merged
User
Functions
The engine documentation for functions is all right. They're generally in the right /engine/Sim.lua
, /engine/User.lua
, or /engine/Core.lua
file.
-
AudioSetLanguage
(unmerged) -
EntityCategoryContains
(unmerged) -
EntityCategoryFilterDown
(unmerged) -
GetBlueprint
(unmerged) -
GetDepositsAroundPoint
(unmerged) -
GetGameTimeSeconds
(unmerged) -
GetTimeForProfile
(missing) -
GetUnitById
(unmerged) -
HasLocalizedVO
(unmerged) -
IsAlly
(unmerged) -
IsEnemy
(unmerged) -
IsNeutral
(unmerged) -
LuaDumpBinary
(missing) -
ParseEntityCategory
(unmerged) -
Random
(unmerged) -
SessionIsReplay
(unmerged) -
SetFocusArmy
(unmerged) -
_ALERT
(missing) -
_TRACEBACK
(missing)
-
SoundIsPrepared
(pending fixing) -
StartSound
(pending fixing) -
StopAllSounds
(pending fixing) -
StopSound
(pending fixing) -
SyncPlayableRect
(pending fixing) -
TeamColorMode
(pending fixing) -
ToggleFireState
(pending fixing) -
ToggleScriptBit
(pending fixing) -
UISelectAndZoomTo
(pending fixing) -
UISelectionByCategory
(pending fixing) -
UIZoomTo
(pending fixing) -
UnProject
(pending fixing) -
ValidateIPAddress
(pending fixing) -
ValidateUnitsList
(pending fixing) -
WorldIsLoading
(pending fixing) -
WorldIsPlaying
(pending fixing) -
_c_CreateCursor
(pending fixing) -
_c_CreateDecal
(pending fixing) -
_c_CreatePathDebugger
(pending fixing)
Variables
No documentation at all, which is fine since there's very little here anyway. It's also a little weird since it depends when the Lua state is initialized.
Sim
-
__language
(missing)
Core
-
__factory_objects
(missing) -
_LOADED
(missing)
Core at Launch
-
__blueprints
(missing) -
__factory_objects
(missing) -
_LOADED
(missing) -
categories
(missing)
And the values as part of the import mechanic, including __diskwatch
.
And once you're in game, __EngineStats
as populated by the engine.
I was intending to just do stuff from the engine right now, so I left out everything that comes from a Lua file (e.g. siminit.lua
, userinit.lua
, globalinit.lua
...).
__EngineStats
is interesting though, I didn't pick that one up. It must be set later in the game, because I only picked up stuff at initialization and didn't see it. Does that interact with UserUnit:GetStat perchance?
Would we like to document items that the engine interacts with, but does not define? An example would be https://github.com/Hdt80bro/fa/blob/annotate-engine/user.lua/engine/User/CMauiEdit.lua#L158-L191
Actually, an even better example would probably be the Sync
tables.
Yes - that is very useful! There are a lot of strange Lua / engine interactions with unit functions
Can this issue get converted to a Wiki entry, on this repository?
A Wiki entry? I'd prefer to just fix the documentation differences. If you're talking about engine interactions though, then yes! That'd be a good idea.