Lua: Fix deprecated end_text references in core

This commit is contained in:
Celtic Minstrel 2021-08-23 09:22:08 -04:00 committed by GitHub
parent 536d6a226c
commit 9daa10a9f2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -15,8 +15,11 @@ function wesnoth.wml_actions.endlevel(cfg)
local end_text = cfg.end_text
local end_text_duration = cfg.end_text_duration
if end_text or end_text_duration then
wesnoth.set_end_campaign_text(end_text or "", end_text_duration)
if end_text then
wesnoth.scenario.end_text = end_text
end
if end_text_duration then
wesnoth.scenario.end_text_duration = end_text_duration
end
local end_credits = cfg.end_credits