Gets called when the game state is removed (ie. quitting to main menu or loading a savefile)
myModClass = {}
myModClass.id = "myUniqueModID"
myModClass.priority = 1
function myModClass:remove()
end
function myModClass:load(loadedData)
if loadedData then
self.someVarOne = loadedData.someVarOne
self.someVarTwo = loadedData.someVarTwo
end
end
function myModClass:save()
return {
someVarOne = self.someVarOne,
someVarTwo = self.someVarTwo
}
end
game.addLoadComponent(myModClass, myModClass.id, myModClass.priority)