renoth / factorio-alien-module

A mod for factorio
MIT License
14 stars 16 forks source link

One more issue - forceName incorrect in init_gui #88

Closed vfinn closed 2 months ago

vfinn commented 6 months ago

can you change: image to

function init_gui()
    for _, player in pairs(game.players) do
        player.gui.top.add { type = "frame", name = "alienmodule", direction = "vertical" }
        player.gui.top.alienmodule.add { type = "label", name = "killcount", caption = "TEST" }
        player.gui.top.alienmodule.add { type = "progressbar", name = "killbar" }

        player.gui.top.alienmodule.killbar.value = math.max(roundModuleLevel(player.force.name) - global.modulelevel[player.force.name], 0)
    end
end

Notice the change of forceName to player.force.name

renoth commented 2 months ago

is this fixed?

vfinn commented 2 months ago

Yes