Classes

Concepts

Libraries

Objects

contractor »

conversationAnswerData »

engineStatData »

issueData »

playerPlatformSpecialistData »

projectReviewConclusion »

projectReviewRemark »

randomEventData »

statusIcon »

assignTrait

Description

Abstract, called when assigning a trait to a developer.

Arguments

1 developer dev

the assignee.

Example

traits:registerNew({
	id = "extraverted",
	display = _T("EXTRAVERTED", "Extraverted"),
	quad = "trait_extraverted",
	selectableForPlayer = false,
	discoveryLevel = 3,
	maxPeopleUntilEfficiencyDrop = 40,
	conflictingTraits = {
		asocial = true
	},
	expoDriveDropMultiplier = 0, -- don't lose any drive in game conventions

	description = _T("EXTRAVERTED_DESCRIPTION", "Efficiency drops slower when a lot of people are in the same room, game conventions do not tire out the employee."),
	
	assignTrait = function(self, target)
		target.maxPeopleUntilEfficiencyDrop = self.maxPeopleUntilEfficiencyDrop
		target:setExpoDriveDropMultiplier(self.expoDriveDropMultiplier)
	end,
	
	formatDescriptionText = function(self, descBox, employee, wrapWidth, font)
		descBox:addSpaceToNextText(iconSpacing)
		descBox:addText(_format(_T("EXTRAVERTED_AFFECTOR", "MAX people in room before efficiency drop"), "MAX", self.maxPeopleUntilEfficiencyDrop), font, game.UI_COLORS.LIGHT_BLUE, 0, wrapWidth, "increase", 22, 22)
	end})