Closed pandaro closed 8 years ago
https://github.com/eronoobos/BABAR-The-Shardifant/commit/17da41e2f434f45c9c1d7cca1a4688a9c8e50bd1 small improvement in human readability
I saw now your job, thanks. A question still, I have seen that you have created a file inside the BAR folder called: "getunitfeaturetable.lua". Also this file can create a unitTable and FeatureTable. questions: 1 will only do so if it's Shard LuaAI? 2 may create misunderstandings? 3 if I wanted to add to unitTable different values such as: speed maxslope movement class unitCanBuild (in the case of a factory) 3.1 What do you think about that? 3.2 where files should I change? getunitfeaturetable or Shard_help_unit_table?
4 too many questions?
3.1
speed: Good idea
maxslope: This would only be useful for Shard LuaAI, which has access to the UnitDefs directly, so it seems unnecessary. Tardendai would probably disagree.
movement class: Ok, but if movement class is to be used, then mtype shouldn't. Refactoring everything to use movement class instead of mtype sounds daunting to me, but maybe it wouldn't be so bad.
unitCanBuild: Same as maxslope. Shard C++ already has access to this through unit:CanBuild(unittype). Edit: Ah, I see, but not as a table of stuff it can build. You could build such tables from many tests of unit:CanBuild(unittype), but true, that might not be the way to go about it.
3.2 Both. They have basically the same code now, just one writes stuff to files at the end. I would be cool if they could share code, but the widget has to be copied to luaui/widgets/, and the place where the BA/BAR config lives on the hard drive relative to there isn't predictable. The best I can do is to set it up so getunitfeaturetable.lua is a block of code that can be copied straight into the widget, except for the return unitTable, featureTable
bit
PS Another point of potential confusion: I should probably remove the unused https://github.com/eronoobos/BABAR-The-Shardifant/blob/17da41e2f434f45c9c1d7cca1a4688a9c8e50bd1/devwidgets/ShardGetUnittable.lua but I keep thinking Beherith did something smart that I'll need in the future.
What should be update in order to use shardgetunittable.lua at its latest version?