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 »

pickText

Description

Picks the text for display in the review.

Arguments

1 projectReview object

the review that the remark is inside of.

2 table remarksTable

all the data placed inside the table by the :attemptAdd method.

Returns

1 string

the text to display.

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