Classes

Concepts

Libraries

Objects

contractor »

conversationAnswerData »

engineStatData »

issueData »

playerPlatformSpecialistData »

projectReviewConclusion »

projectReviewRemark »

randomEventData »

statusIcon »

attemptAdd

Description

Attempts adding the remark to the review.

Arguments

1 projectReview object

the review to add the remark to.

2 table remarksTable

the table to insert various remark data into, for later use in the remark's :pickText method. The table must have at least 1 numeric index starting at 1 for the remark to be considered valid.

Example

projectReview:registerRemark({
	id = "features_vs_price_vs_scale_too_low",
	text = {
		_T("FEATURES_VS_PRICE_VS_SCALE_TOO_LOW_1", "keeping the price & the amount of features in the project in mind, we think it's priced too high"),
		_T("FEATURES_VS_PRICE_VS_SCALE_TOO_LOW_2", "we think the price is too high for the amount of features there are in the game"),
	},
	
	attemptAdd = function(self, reviewObject, remarksTable)
		local project = reviewObject:getProject()
		local affector = project:getFeatureCountSaleAffector()
		
		if affector < 1 then
			remarksTable.weight = 30
			table.insert(remarksTable, {textID = math.random(1, #self.text)})
		end
	end,
	
	pickText = function(self, reviewObject, remarksTable)
		local project = reviewObject:getProject()
		
		local engineFeaturePercentage, featurePercentage = project:getEngineFeatureCountSaleAffector(), project:getGameFeatureCountSaleAffector()
		
		--print("feature percentages", featurePercentage, engineFeaturePercentage)

		if featurePercentage < 1 and engineFeaturePercentage < 1 then
			reviewObject:addConclusion("features_vs_price_vs_scale_too_low")
		elseif featurePercentage < 1 then
			reviewObject:addConclusion("game_features_vs_price_vs_scale_too_low")
		elseif engineFeaturePercentage < 1 then
			reviewObject:addConclusion("engine_features_vs_price_vs_scale_too_low")
		end
		
		return self.text[remarksTable[1].textID]
	end
})