fa icon indicating copy to clipboard operation
fa copied to clipboard

Track differences between Engine documentation and Moho

Open Hdt80bro opened this issue 2 years ago • 6 comments

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

  • ~~moho.IAniManipulator (currently named CManipulator)~~ done

Core

User

  • moho.discovery_service_methods (pending creation)

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.

Core

  • 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)

User

  • 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)

Hdt80bro avatar Jul 12 '22 23:07 Hdt80bro

And the values as part of the import mechanic, including __diskwatch.

And once you're in game, __EngineStats as populated by the engine.

Garanas avatar Jul 13 '22 08:07 Garanas

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?

Hdt80bro avatar Jul 13 '22 16:07 Hdt80bro

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.

Hdt80bro avatar Jul 13 '22 16:07 Hdt80bro

Yes - that is very useful! There are a lot of strange Lua / engine interactions with unit functions

Garanas avatar Jul 20 '22 12:07 Garanas

Can this issue get converted to a Wiki entry, on this repository?

Garanas avatar Aug 01 '22 16:08 Garanas

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.

Hdt80bro avatar Aug 01 '22 16:08 Hdt80bro