I did a complete reinstall of Avorion (deleted folder in steam and %appdata%) This to make sure it did not conflict with anything
I then launched a new world (single player) with only this mod installed. Refurbished 2 mines and let the game run for 1 hour afk. As there had not yet been given me any minerals, I jumped out of the system and let the game run 1 more hour afk. Still no minerals to my account.
I wish there was some debugging that could be enabled in the scripts, would love to see what actually happens when the script run the function initPlayerData(player) and function iteration(timestep)
EDIT:
I added debug to function initPlayerData(player) and confirms that the functions are called.
I added debug to function iteration(timestep) as shown bellow
function iteration(timestep)
player:sendChatMessage("", 2, "function iteration : invoked")
if time > config.defaultTime then
local player = Player()
for index, material in pairs(ressources) do
local mines = player:getValue(prefix .. material .. "MineAmount")
player:receiveResource(Material(index - 1), mines * config.defaultIncome)
player:sendChatMessage("", 2, "function iteration : You should be payed: " .. mines * config.defaultIncome .. "$")
end
time=0
player:sendChatMessage("", 2, "function iteration : setting time=" .. time .. "")
else
time= time + timestep
player:sendChatMessage("", 2, "function iteration : not the time to get payed: time=" .. time .. "")
end
end
But this functions never run.