Deprecated: str_replace(): Passing null to parameter #1 ($search) of type array|string is deprecated in /var/www/vhosts/gamedevstudiogame.com/httpdocs/classes/client.php on line 124

Deprecated: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in /var/www/vhosts/gamedevstudiogame.com/httpdocs/classes/client.php on line 124
Game dev studio

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
})