1
0
mirror of https://github.com/Refactorio/RedMew.git synced 2025-01-30 04:30:58 +02:00

Store surface_count in Global

This commit is contained in:
James Gillham 2020-10-04 12:10:27 +01:00
parent 31601c4ec3
commit 08d291b62a

View File

@ -1,7 +1,16 @@
local Global = require 'utils.global'
local Public = {}
local surface_count = 0
Global.register(
{surface_count = surface_count},
function(tbl)
surface_count = tbl.surface_count
end
)
local function get_surface_name()
surface_count = surface_count + 1
return 'test_surface' .. surface_count