I'd like place a tile, and then maybe after an hour of game time, switch that tile out.
Is there a way to do this that won't be to CPU intensive?
Would I do it the same way I did it with a mine entity in my mod:
Code: Select all
if game.tick % (60 * 60 * 10) == 0 then -- Check every 10 min for old mines, Expansion settings --- Check for Old Mines if global.deployed_mine ~= nil then for k, Old_Mines in pairs(global.deployed_mine) do if Old_Mines.time and Old_Mines.time + (3600 * 30) < game.tick then -- 3600 is 1 min, remove mines older than 30min Old_Mines.mine.destroy() Old_Mines.time = nil Old_Mines.mine = nil end end end