FAForever / fa

Lua code for FAF
221 stars 228 forks source link

platoon.lua annotations and warning fixes [lua/platoon.lua] #6083

Closed clyfordv closed 2 months ago

clyfordv commented 3 months ago

Annotation and warning fixes for platoon.lua

files: lua/platoon.lua

focus:

relent0r commented 2 months ago

Did testing of this in AI games and did not see any obvious errors except about that wall builder. It produces this, I did see you had another PR that was for the aiutilities but I haven't delved into it yet.

warning: Error running lua script: string expected but got userdata stack traceback: [C]: in function ParseEntityCategory' g:\code\fa\lua\ai\aiutilities.lua(1052): in functionGetLocationNeedingWalls' g:\code\fa\lua\platoon.lua(2274): in function <g:\code\fa\lua\platoon.lua:2192>

Though tbh its got a zero priority so is effectively disabled, you wouldn't know there was a problem unless you specifically enabled it.

relent0r commented 2 months ago

@clyfordv Can you add a snippets entry for this PR. It would be /changelog/snippets/ai.6083.md With just an entry of something like say - (#6083) annotations of platoon.lua and logic fixes