Skip to content

Commit

Permalink
Handle speaker=id directly in [message] instead of relying on SUF
Browse files Browse the repository at this point in the history
(cherry-picked from commit 2bd2a8b)
  • Loading branch information
CelticMinstrel committed Oct 7, 2018
1 parent 52d3b7b commit 05a45b8
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions data/lua/wml/message.lua
Expand Up @@ -183,6 +183,8 @@ local function get_speaker(cfg)
speaker = wesnoth.get_unit(context.x1 or 0, context.y1 or 0)
elseif cfg.speaker == "second_unit" then
speaker = wesnoth.get_unit(context.x2 or 0, context.y2 or 0)
elseif cfg.speaker ~= nil then
speaker = wesnoth.get_unit(cfg.speaker)
else
speaker = wesnoth.get_units(cfg)[1]
end
Expand Down

0 comments on commit 05a45b8

Please sign in to comment.