Fixed left guis being nil

This commit is contained in:
Cooldude2606
2019-06-13 18:24:16 +01:00
parent 3eec6f1863
commit c59c8fcf54
2 changed files with 23 additions and 0 deletions

View File

@@ -183,6 +183,28 @@ function LeftFrames._prototype:get_frame(player)
local flow = LeftFrames.get_flow(player)
if flow[self.name..'-frame'] and flow[self.name..'-frame'].valid then
return flow[self.name..'-frame']
else
local frame = flow.add{
type='frame',
name=self.name..'-frame',
direction=self.direction
}
if self.events.on_draw then
self.events.on_draw(player,frame)
end
if not self.open_by_default then
frame.visible = false
elseif type(self.open_by_default) == 'function' then
if not self.open_by_default(player,self.name) then
frame.visible = false
end
end
if not Toolbar.allowed(player,self.name) then
frame.visible = false
end
end
end

View File

@@ -655,6 +655,7 @@ end)
local warps = force_warps[force_name] or {}
for _,warp_id in pairs(warps) do
generate_warp(player,data_table,warp_id)
make_warp_tag(warp_id)
end
end)
:on_player_toggle(function(player,element,visible)