Abstract, called when formatting the trait's description text.
Abstract, called when formatting the trait's description text.
1 descbox the descbox to fill text with.
2 developer dev
the developer that the trait belongs to.
3 number wrapWidth
the maximum text wrap width.
4 string font
the font to use.
traits:registerNew({ id = "procrastinator", display = _T("PROCRASTINATOR", "Procrastinator"), quad = "trait_procrastinator", discoveryLevel = 8, selectableForPlayer = false, developSpeedMultiplier = 0.95, chance = 50, description = _T("PROCRASTINATOR_DESCRIPTION", "Don't rush it, there's tons of time left."), conflictingTraits = { lazy = true, unmotivated = true, slacker = true, workaholic = true, hyper = true }, assignTrait = function(self, target) target:setDevelopSpeedMultiplier(self.id, self.developSpeedMultiplier) end, formatDescriptionText = function(self, descBox, employee, wrapWidth, font) descBox:addSpaceToNextText(iconSpacing) descBox:addText(_format(_T("SLACKER_AFFECTOR_1", "MULT% slower development speed"), "MULT", math.round((1 - self.developSpeedMultiplier) * 100, 1)), font, game.UI_COLORS.RED, 0, wrapWidth, "decrease_red", 22, 22) end})