Skip to content

Commit

Permalink
Lua AIs: remove commented-out debug code
Browse files Browse the repository at this point in the history
(cherry-picked from commit 23f3554)
  • Loading branch information
mattsc committed Oct 7, 2018
1 parent b044b28 commit 7e63932
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 9 deletions.
1 change: 0 additions & 1 deletion data/ai/lua/ai_helper.lua
Expand Up @@ -1523,7 +1523,6 @@ function ai_helper.movefull_outofway_stopunit(ai, unit, x, y, cfg)
if unit_in_way and (unit_in_way ~= unit)
and ai_helper.is_visible_unit(viewing_side, unit_in_way)
then
--W.message { speaker = 'narrator', message = 'Moving out of way' }
ai_helper.move_unit_out_of_way(ai, unit_in_way, cfg)
end
end
Expand Down
1 change: 0 additions & 1 deletion data/ai/lua/generic_recruit_engine.lua
Expand Up @@ -688,7 +688,6 @@ return {
if recruit_data.castle.loose_gold_limit >= recruit_data.recruit.cheapest_unit_cost then
gold_limit = recruit_data.castle.loose_gold_limit
end
--print (recruit_data.castle.loose_gold_limit .. " " .. recruit_data.recruit.cheapest_unit_cost .. " " .. gold_limit)

local recruitable_units = {}

Expand Down
7 changes: 0 additions & 7 deletions data/campaigns/Eastern_Invasion/ai/ca_ogres_flee.lua
Expand Up @@ -32,9 +32,6 @@ function ca_ogres_flee:execution()
local max_rating, best_hex, best_unit = - math.huge
for i,u in ipairs(units) do
local reach = wesnoth.find_reach(u)

--local rating_map = LS.create()

for j,r in ipairs(reach) do
local unit_in_way = wesnoth.get_unit(r[1], r[2])

Expand Down Expand Up @@ -74,17 +71,13 @@ function ca_ogres_flee:execution()

rating = rating + own_unit_rating * own_unit_weight

--rating_map:insert(r[1], r[2], rating)

if (rating > max_rating) then
best_hex = { r[1], r[2] }
best_unit = u
max_rating = rating
end
end
end

--AH.put_labels(rating_map)
end

if best_hex then
Expand Down

0 comments on commit 7e63932

Please sign in to comment.