Panakotta00 / FicsIt-Networks

Control, Monitor, Manage and Automate your Satisfactory.
https://ficsit.app/mod/FicsItNetworks
GNU General Public License v3.0
158 stars 51 forks source link

Screens shows nothing after reload #72

Closed Bommik closed 3 years ago

Bommik commented 3 years ago

The lagre screen and computer screen shows nothing after reloading. However, the computer continues to run normally. After rerunning the code, the content is displayed normally. To reproduce you need a computer with:

how to reproduce the bug:

  1. run the code
  2. the screens should show the incrementing number
  3. save the game while the computer is running
  4. reload the game
  5. the screens shows nothing until rerunning the code

I used this code for testing:

gpus = computer:getGPUs()
computerScreen = computer.getScreens()[1]
largeScreen = component.proxy("...")
gpus[1]:bindScreen(computerScreen)
gpus[2]:bindScreen(largeScreen)
w,h = 56,25
gpus[1]:setSize(w,h)
gpus[2]:setSize(w,h)
x = 0
event.ignoreAll()
event.clear()
while true do
 x = x + 1
 for _,gpu in pairs(gpus) do
  gpu:setBackground(0,0,0,0)
  gpu:setForeground(1,1,1,1)
  gpu:fill(0,0,w,h," ")
  gpu:setText(0,0,x)
  gpu:flush()
 end
 print(x)
 event.pull(1)
end