[MOD 0.12.20] Time Display

Topics and discussion about specific mods
Post Reply
TheLapisFox
Manual Inserter
Manual Inserter
Posts: 1
Joined: Mon Jan 18, 2016 3:45 am
Contact:

[MOD 0.12.20] Time Display

Post by TheLapisFox »

Original Post: Time Display

Mod was not working for 12.x so went ahead and updated it. Now works properly, as far as I could test. I have not tested it in MP with the new fixes, but should work fine thanks to FreeER's fixes. If anyone finds any bugs, let me know and I will try to figure out the issue.
  • Name: Time Display
  • Version: 2.0.0
  • Created by: Dark (Original); v 11.x Fix done by: Frostea/FreeER; v12.x Update by: TheLapisFox
  • Factorio-Version: 0.12.20
  • Description: Displays configurable in-game time and play duration.
  • Release: 2016-01-18
  • Category: UI, Helper
  • Tags: User-Interface
Image of the 12h option on the in-game clock
Image of the 12h option on the in-game clock
timedisplay image.jpg (40.86 KiB) Viewed 9682 times
Configuration Options
Changelog
Attachments
timedisplay_2.0.0.zip
Updated file
(4.77 KiB) Downloaded 601 times

DaysofKnight
Burner Inserter
Burner Inserter
Posts: 11
Joined: Wed Mar 02, 2016 12:01 pm
Contact:

Re: [MOD 0.12.20] Time Display

Post by DaysofKnight »

'Unknown key:"Error while running the on_load:_ _timedisplay_ _/control.lua:143: attempt to index global 'game' (a nil value)" '

There's no game.on's in the control.lua file... Wtf?

daniel34
Global Moderator
Global Moderator
Posts: 2761
Joined: Thu Dec 25, 2014 7:30 am
Contact:

Re: [MOD 0.12.20] Time Display

Post by daniel34 »

DaysofKnight wrote:'Unknown key:"Error while running the on_load:_ _timedisplay_ _/control.lua:143: attempt to index global 'game' (a nil value)" '

There's no game.on's in the control.lua file... Wtf?
Yes, that's an error in the mod.

Code: Select all

script.on_load(function()
  -- restore gui state on load or right after save
  for playerindex, player in ipairs(game.players) do      <--- line 143
    set_defaults(playerindex)
    init_gui(playerindex)
    do_update(playerindex)
  end
end)
The script.on_load function has a reference to game.player - references to 'game' within on_load are not allowed anymore.
quick links: log file | graphical issues | wiki

DaysofKnight
Burner Inserter
Burner Inserter
Posts: 11
Joined: Wed Mar 02, 2016 12:01 pm
Contact:

Re: [MOD 0.12.20] Time Display

Post by DaysofKnight »

daniel34 wrote:Yes, that's an error in the mod.

Code: Select all

script.on_load(function()
  -- restore gui state on load or right after save
  for playerindex, player in ipairs(game.players) do      <--- line 143
    set_defaults(playerindex)
    init_gui(playerindex)
    do_update(playerindex)
  end
end)
The script.on_load function has a reference to game.player - references to 'game' within on_load are not allowed anymore.
Had that problem with Evolution: Alien Manipulation. Deleted the code for game.player in that one and it worked fine, but in that one if was more obvious what needed to be deleted.
What do I need to delete to make this one work? Just line 143?

Edit: I got it to work by removing the "for playerindex, player in ipairs(game.players) do" line and removing the first end. Now sure if that's right, but it loads now. Not a coder in anyway, so I don't know what that did.

Edit 2 (Days later): It doesn't work anymore

User avatar
Bergzwerg
Burner Inserter
Burner Inserter
Posts: 16
Joined: Mon Mar 28, 2016 12:18 am
Contact:

Re: [MOD 0.12.20] Time Display

Post by Bergzwerg »

i fiddled around with it now too but can't get it to work.

would love an updated version though.

seronis
Fast Inserter
Fast Inserter
Posts: 225
Joined: Fri Mar 04, 2016 8:04 pm
Contact:

Re: [MOD 0.12.20] Time Display

Post by seronis »

The go to the Bobs Mods section and grab it. Its appropriately named 'clock'

User avatar
Bergzwerg
Burner Inserter
Burner Inserter
Posts: 16
Joined: Mon Mar 28, 2016 12:18 am
Contact:

Re: [MOD 0.12.20] Time Display

Post by Bergzwerg »

hey, tahnks for your quick reply!

i did try to download bob's clock but:

509 Bandwidth Limit Exceeded
The server is temporarily unable to service your request due to the site owner reaching his/her bandwidth limit. Please try again later.

will try again tommorrow.

seronis
Fast Inserter
Fast Inserter
Posts: 225
Joined: Fri Mar 04, 2016 8:04 pm
Contact:

Re: [MOD 0.12.20] Time Display

Post by seronis »

https://www.dropbox.com/s/ooui2pq4y0fso ... 7.zip?dl=1

His current download link from the general thread. Seems to be working for me

User avatar
Bergzwerg
Burner Inserter
Burner Inserter
Posts: 16
Joined: Mon Mar 28, 2016 12:18 am
Contact:

Re: [MOD 0.12.20] Time Display

Post by Bergzwerg »

thanks a bunch!

must have missed the dropbox link and scrolled down to the separate downloads :roll:

Post Reply

Return to “Mods”