From fda3c9af759edf4fcb9037ef12b2d1d6102f2d59 Mon Sep 17 00:00:00 2001 From: Celtic Minstrel Date: Wed, 13 Nov 2019 07:39:20 -0500 Subject: [PATCH] [modify_unit]: fix handling of unrenamable in the optimized path --- data/lua/wml/modify_unit.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/data/lua/wml/modify_unit.lua b/data/lua/wml/modify_unit.lua index e1bfc6fb356..54bb7a6e464 100644 --- a/data/lua/wml/modify_unit.lua +++ b/data/lua/wml/modify_unit.lua @@ -134,7 +134,7 @@ local function simple_modify_unit(cfg) if cfg.ai_special == "guardian" then u.status.guardian = true end - if cfg.unrenamable then + if cfg.unrenamable ~= nil then u.renamable = not cfg.unrenamable end ---------- SIMPLE ATTRIBUTES ----------