Here's a work around for this. Since it's not really a bug per say but if you don't want a name set for your module you'll need another way to define the save game name.
Add this function to your newGame() function in game.lua. I did it inside local birth = Birther.new(nil, self.player, {"base", "role"}, function()
Code: Select all
function _M:registerBirthProfile()
local birth_profile = game:registerDialog(require('engine.dialogs.GetText').new("Please enter a name for this save profile", "Save Profile", 2, 25, function(text)
local savename = text:gsub("[^a-zA-Z0-9_-.]", "_")
if fs.exists(("/%s/save/%s/game.teag"):format(self.__mod_info.short_name, savename)) then
Dialog:yesnoPopup("Overwrite profile?", "There is already a game saved with this profile name, do you want to overwrite it?", function(ret)
if not ret then
self:setPlayerName(text)
else
return self:registerBirthProfile()
end
end, "No", "Yes")
else
self:setPlayerName(text)
end
end))
end