eronoobos / BABAR-The-Shardifant

Balanced Annihilation & Balanced Annilhation Reloaded configuration for Shard
2 stars 1 forks source link

get pathFinding info #2

Closed pandaro closed 8 years ago

pandaro commented 8 years ago

this is two function to get info about the pathfinding 1simplifi the number of spot by aggregate the nearest based on map dimension 2 calculate path from a hotspot to each other filtered if the path have sense or not

i have a question: if the shard version is not luaai, can be problems?

and i have a plan in mind: i will split (as @tarendai suggest) the taskqueuebehaviour in 2 subfile by separate the factories choice and building in a cleaned and smart system: factorybuildersbehaviour.lua

@eronoobos you agree? any suggest?

eronoobos commented 8 years ago

there would have been problems if shard was not run as a spring lua ai. ShardSpringLua is true when shard is run as a spring lua ai. it's set by the AILoader gadget: https://github.com/eronoobos/ShardSpringLua/blob/4a2c0308ab053f678e82bc2296dabbeb3d4ee201/luarules/gadgets/AILoader.lua#L14

this commit prevents those problems: https://github.com/eronoobos/BABAR-The-Shardifant/commit/3708766c081d040903d8316eeaf74101f6afe47b

eronoobos commented 8 years ago

hm, i don't think MapHandler:SpotPathMobRank should be called at all until the data is used for something

tomjn commented 8 years ago

I'm not keen on Spring.TestMoveOrder being used directly, ideally it would be added to the API object, along with a default/error/placeholder being returned when used on the C++ version of the AI. That way support can be added on the native side.

But keep in mind, it's an expensive test