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:
parent
31601c4ec3
commit
08d291b62a
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user