Skip to content

Commit

Permalink
ai_helper.LS_to_triples: fix function name
Browse files Browse the repository at this point in the history
For consistency with LS_of_triples.
  • Loading branch information
mattsc committed Oct 5, 2016
1 parent 7ad4ba4 commit b00e6d5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion data/ai/lua/ai_helper.lua
Expand Up @@ -323,7 +323,7 @@ function ai_helper.LS_of_triples(table)
return set
end

function ai_helper.to_triples(set)
function ai_helper.LS_to_triples(set)
local res = {}
set:iter(function(x, y, v) table.insert(res, { x, y, v }) end)
return res
Expand Down
2 changes: 1 addition & 1 deletion data/ai/micro_ais/cas/ca_bottleneck_move.lua
Expand Up @@ -101,7 +101,7 @@ local function bottleneck_create_positioning_map(max_value, data)
end)

-- We need to sort the map, and assign descending values
local locs = AH.to_triples(map)
local locs = AH.LS_to_triples(map)
table.sort(locs, function(a, b) return a[3] > b[3] end)
for i,loc in ipairs(locs) do loc[3] = max_value + 10 - i * 10 end
map = AH.LS_of_triples(locs)
Expand Down

2 comments on commit b00e6d5

@CelticMinstrel
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are there any worries about addons that might have accessed this function?

@mattsc
Copy link
Member Author

@mattsc mattsc commented on b00e6d5 Oct 5, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very unlikely. Also, check out the comment block starting at line 5 of the ai_helper.lua file.

Please sign in to comment.