WC: Use the Markov Chain generator for names

This commit is contained in:
Celtic Minstrel 2021-02-20 16:29:25 -05:00
parent 6865cca0f1
commit 5bc101104a
3 changed files with 6 additions and 12 deletions

View file

@ -273,7 +273,7 @@ function wesnoth.wml_actions.wc2_enemy(cfg)
}
if unit.name == "" then
-- give names to undead
unit.name = wc2_random_names.generate()
unit.name = wc2_random_names()
end
unit:to_map()
wesnoth.wml_actions.set_recruit {

View file

@ -20,7 +20,7 @@ function wesnoth.wml_actions.wc2_place_bonus(cfg)
-- Note: although the numbrs of options passed to helper.rand might depend on the langauge
-- the number of thimes random is called does not (random is called even if there is
-- only one option), so this doesn't cause OOS.
local name1 = wc2_random_names.generate()
local name1 = wc2_random_names()
local name_options = c_scenery.names or { _"place" }
local name2 = tostring(name_options[wesnoth.random(#name_options)])

File diff suppressed because one or more lines are too long