Limited functionality when Factorio ticks only once

Place to post guides, observations, things related to modding that are not mods themselves.
Post Reply
HARPOTHEGREAT
Manual Inserter
Manual Inserter
Posts: 1
Joined: Wed Feb 02, 2022 3:51 pm
Contact:

Limited functionality when Factorio ticks only once

Post by HARPOTHEGREAT »

I am currently helping develop a mod that adds a few TASing tools, but we have a problem with advancing the game exactly one tick. To do so, we have a function that sets game.ticks_to_run = 1. The issue we run into is that many player-initiated actions cannot happen on the first tick after the game is unpaused - most importantly, the player cannot walk, begin mining, begin crafting, or place objects during this tick. I'm fairly certain this is due to tick_paused preventing the player from initiating certain actions for one tick more than it should. Is this actually intended behavior? Also, does anyone have a workaround that allows these actions on this frame?

Post Reply

Return to “Modding discussion”