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 »

onNotPicked

Description

Abstract, called when this topic has been rolled as valid, but was not picked for the interview. Usually used for clearing data that was generated for it.

Arguments

1 interview object

the interview object.

Example

local newGenre = {}
newGenre.id = "new_genre_question"
newGenre.display = _T("INTERVIEW_NEW_GENRE", "Interview - New genre")
newGenre.description = _T("INTERVIEW_NEW_GENRE_DESC", "This is your first time working on a game of the GENRE genre, what can you tell us about the development process?")
newGenre.baseFactName = "asked_about_genre_"
newGenre.answerOptions = {
	{text = _T("INTERVIEW_NEW_GENRE_ANSWER1", "It can be a challenge"), answerScore = 0},
	{text = _T("INTERVIEW_NEW_GENRE_ANSWER2", "It's boring"), answerScore = -10},
	{text = _T("INTERVIEW_NEW_GENRE_ANSWER3", "It's a fun experience"), answerScore = 10},
}

function newGenre:getGenreToTalkAbout(interviewObj)
	local projectGenre = interviewObj:getTargetProject():getGenre()
	
	-- if we've asked about this genre or the player has already created a game of this genre, then don't ask this question

	if studio:getFact(self.baseFactName .. projectGenre) or studio:getGamesByGenre(genreID) then
		return nil
	end
	
	self.genreToAskAbout = projectGenre
end

function newGenre:applyData(topicInst)
	topicInst.genreToAskAbout = self.genreToAskAbout
end

function newGenre:checkEligibility(interviewObj)
	self.genreToAskAbout = nil
	
	self:getGenreToTalkAbout(interviewObj)
	return self.genreToAskAbout ~= nil -- if we don't have one, that means we pass :D

end

function newGenre:onNotPicked(interviewObj)
	self.genreToAskAbout = nil
end

function newGenre:getDescription(interviewObj)
	local genreData = genres:getData(self.genreToAskAbout)
	local text = self.description
		
	if genreData.interviewQuestion then
		text = genreData.interviewQuestion
	end
	
	return string.easyformatbykeys(text, "GENRE", genreData.display)
end

function newGenre:onAnswered(interviewObj)
	studio:setFact(self.baseFactName .. self.genreToAskAbout, true)
	self.genreToAskAbout = nil
end

interviewTopics:registerNew(newGenre)