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 »

saveData

Description

Abstract. Called when saving the game to a savefile. This is where you'll need to save any data you might need to properly display the text in-between game sessions. General rule when saving: any run-time data (ie. employees, game projects) that can be removed (ie. employees) should not be saved directly (ie. their unique IDs), and you should instead save data related to that object. (ie. the employee name config)

Returns

1 any

the data you wish to save.

Example

eventBoxText:registerNew({
	id = "review_published",
	getText = function(self, data)
		return _format(_T("REVIEWER_HAS_REVIEWED_LAYOUT", "'REVIEWER' has published a review of 'GAME_PROJECT'"), "REVIEWER", data.review:getReviewer():getName(), "GAME_PROJECT", data.game:getName())
	end,
	saveData = function(self, data)
		return {reviewer = data.review:getReviewer():getID(), game = data.game:getUniqueID()}
	end,
	loadData = function(self, targetElement, data)
		local gameObj = studio:getGameByUniqueID(data.game)
		local review = gameObj:getReviewObject(data.reviewer)
		targetElement:setReview(review)
		
		return {review = review, game = gameObj} --studio:getGameByUniqueID(data)

	end
})