Module:Constants: Difference between revisions

getDescription: Initial implementation
(getModifiersText: Fix)
(getDescription: Initial implementation)
Line 905: Line 905:


return skillArray
return skillArray
end
-- From game version 1.1 onwards, some entities have custom descriptions, while
-- many are generated based on the modifiers associated to that entity. This
-- function handles that logic given a custom description (may be nil) and
-- a modifiers object
function p.getDescription(customDescription, modifiers)
if customDescription ~= nil then
return customDescription
else
return p.getModifiersText(modifiers, false)
end
end
end


return p
return p