mirror of
https://github.com/PHIDIAS0303/ExpCluster.git
synced 2025-12-30 20:41:41 +09:00
Minnor Changes to core
This commit is contained in:
@@ -30,16 +30,17 @@ local global = global{
|
|||||||
paused={},
|
paused={},
|
||||||
named={},
|
named={},
|
||||||
print_to={},
|
print_to={},
|
||||||
uuid=nil
|
uuid=0
|
||||||
}
|
}
|
||||||
|
|
||||||
--- Used to generate a new uuid for the thread system
|
--- Used to generate a new uuid for the thread system
|
||||||
-- @usage local uuid = tostring(Server.uuid) -- calling tostring locks the value
|
-- @usage local uuid = tostring(Server.uuid) -- calling tostring locks the value
|
||||||
-- @treturn string the new uuid
|
-- @treturn string the new uuid
|
||||||
Server.uuid = add_metatable({},function()
|
Server.uuid = add_metatable({},function()
|
||||||
if not global.uuid then global.uuid = game.create_random_generator() end
|
-- when it is called as a function
|
||||||
return global.uuid()
|
return global.uuid + 1
|
||||||
end,function()
|
end,function()
|
||||||
|
-- when it is treated as a string
|
||||||
return string.to_hex(tostring(Server.uuid()))
|
return string.to_hex(tostring(Server.uuid()))
|
||||||
end)
|
end)
|
||||||
|
|
||||||
|
|||||||
@@ -92,6 +92,13 @@ Gui.center.add{
|
|||||||
}.style.font='default-small'
|
}.style.font='default-small'
|
||||||
end}
|
end}
|
||||||
|
|
||||||
|
script.on_event(defines.events.on_gui_click,function(event)
|
||||||
|
local element = event.element
|
||||||
|
if element and element.valid and element.caption and element.caption == 'Press Ecs or E to close; this is only visible once!' then
|
||||||
|
Gui.center.clear(event)
|
||||||
|
end
|
||||||
|
end)
|
||||||
|
|
||||||
script.on_event(defines.events.on_player_joined_game,function(event)
|
script.on_event(defines.events.on_player_joined_game,function(event)
|
||||||
local player = Game.get_player(event)
|
local player = Game.get_player(event)
|
||||||
Gui.center.open(player,'server-info')
|
Gui.center.open(player,'server-info')
|
||||||
|
|||||||
Reference in New Issue
Block a user