[ignore] flush .print("")

Things that we aren't going to implement
Post Reply
matjojo
Filter Inserter
Filter Inserter
Posts: 337
Joined: Wed Jun 17, 2015 6:08 pm
Contact:

[ignore] flush .print("")

Post by matjojo »

Currently there is no way to flush the game.player.print function as far as I know, I have a piece of code that is very very heavy to run. It takes a good 5 minutes sometimes. Now I want to print a message, saying that the game WILL come back and is not broken. but with or without \n I can't get the game to flush the print function. Am I missing something or is there no flush like function?
Last edited by matjojo on Wed Jan 20, 2016 1:32 pm, edited 1 time in total.

orzelek
Smart Inserter
Smart Inserter
Posts: 3911
Joined: Fri Apr 03, 2015 10:20 am
Contact:

Re: [request] flush .print("")

Post by orzelek »

I would assume that one way would be to print the message first then run the job on next tick.

ratchetfreak
Filter Inserter
Filter Inserter
Posts: 952
Joined: Sat May 23, 2015 12:10 pm
Contact:

Re: [request] flush .print("")

Post by ratchetfreak »

or you should split the heavy function up in several chunks that you can spread over multiple ticks

So you don't have to stop the world to do your calc

matjojo
Filter Inserter
Filter Inserter
Posts: 337
Joined: Wed Jun 17, 2015 6:08 pm
Contact:

Re: [ignore] flush .print("")

Post by matjojo »

ratchetfreak wrote:or you should split the heavy function up in several chunks that you can spread over multiple ticks

So you don't have to stop the world to do your calc
orzelek wrote:I would assume that one way would be to print the message first then run the job on next tick.


alright, I took a look at my code and realised that just like you said, It can only print when the next tick happens, I'll edit the name of the topic to delete, so you guys know it is not necessary, but a mistake on my side.

Post Reply

Return to “Won't implement”