Classes

Concepts

Libraries

Objects

contractor »

conversationAnswerData »

engineStatData »

issueData »

playerPlatformSpecialistData »

projectReviewConclusion »

projectReviewRemark »

randomEventData »

statusIcon »

handleEvent

Description

Handles the fired event. The preferenceData must have catchableEvents defined on it for this to be called.

Arguments

1 vararg any

data.

Example

preferences:registerNew({
	id = "auto_practice_each_week",
	display = _T("AUTO_PRACTICE_EACH_WEEK", "Auto-practice every week"),
	description = _T("AUTO_PRACTICE_EACH_WEEK_DESCRIPTION", "Employees that are idling will automatically have practice tasks assigned to them at the start of a new week.

Enabling this will cause employees to lose their Drive faster, as any kind of task drains it."),
	catchableEvents = {
		timeline.EVENTS.NEW_WEEK
	},
	handleEvent = function(self, event)
		if preferences:get(self.id) then
			for key, teamObj in ipairs(studio:getTeams()) do
				teamObj:assignPracticeToIdlingEmployees()
			end
		end
	end
})