Registers a method to call upon the release of a game project.
Registers a method to call upon the release of a game project.
1 string type
the game type. Refer to the DEVELOPMENT_TYPE table.
-- taken from game/game/project.lua -- register an MMO-specific release callback, which calculates the MMO attractiveness gameProject.registerReleaseCallback(gameProject.DEVELOPMENT_TYPE.MMO, function(gameProj) local taskList = gameProj:getMMOTasks() local taskMap = taskTypes.registeredByID local genre = gameProj:getGenre() local matchValue = 1 local finalMult = 1 for key, taskID in ipairs(taskList) do local data = taskMap[taskID] local mmoMatch = data.mmoMatch[genre] if mmoMatch < 1 then finalMult = finalMult * mmoMatch elseif mmoMatch > 1 then matchValue = matchValue + (mmoMatch - 1) end end local finalValue = matchValue * finalMult gameProj:setFact(gameProject.MMO_ATTRACTIVENESS_FACT, finalValue) local totalContent, totalComplexity = gameProj:countMMOValues() end)