From 6d4473bec563323932bb75d20760cc588897d07f Mon Sep 17 00:00:00 2001 From: Cooldude2606 Date: Mon, 1 Jan 2018 23:56:28 +0000 Subject: [PATCH 1/2] Fixed Bug In Center Gui --- ExpCore/GuiParts/center.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ExpCore/GuiParts/center.lua b/ExpCore/GuiParts/center.lua index 8036d536..3b13fa19 100644 --- a/ExpCore/GuiParts/center.lua +++ b/ExpCore/GuiParts/center.lua @@ -50,7 +50,7 @@ function center._center.open(event) direction='vertical', style=mod_gui.frame_style } - if player.gui.is_valid_sprite_path(center_frame.caption) then center_frame.caption = '' end + if is_type(center_frame.caption,'string') and player.gui.is_valid_sprite_path(center_frame.caption) then center_frame.caption = '' end if is_type(_center.draw,'function') then local success, err = pcall(_center.draw,_center,center_frame) if not success then error(err) end From 4144054e2d9ae665f5281d6ef2b6b0321dda9465 Mon Sep 17 00:00:00 2001 From: Cooldude2606 Date: Tue, 2 Jan 2018 00:59:15 +0000 Subject: [PATCH 2/2] Edit To Ranking and ExpLib --- ExpCore/ranking.lua | 6 +++--- ExpLib.lua | 20 ++++++++++++++++++++ 2 files changed, 23 insertions(+), 3 deletions(-) diff --git a/ExpCore/ranking.lua b/ExpCore/ranking.lua index c7dfe9ee..808b7fff 100644 --- a/ExpCore/ranking.lua +++ b/ExpCore/ranking.lua @@ -49,16 +49,16 @@ function Ranking.get_rank(mixed) local _return = false if is_type(mixed,'table') then if mixed.index then - _return = game.players[mixed.index] and ranks[mixed.permission_group.name] or false + _return = game.players[mixed.index] and ranks[mixed.permission_group.name] or nil else - _return = mixed.group and mixed or false + _return = mixed.group and mixed or nil end else _return = game.players[mixed] and ranks[game.players[mixed].permission_group.name] or table.autokey(ranks,mixed) and table.autokey(ranks,mixed) or string.contains(mixed,'server') and Ranking.get_rank(Ranking._presets().meta.root) or string.contains(mixed,'root') and Ranking.get_rank(Ranking._presets().meta.root) - or false + or nil end return _return end diff --git a/ExpLib.lua b/ExpLib.lua index b152ac46..9a502247 100644 --- a/ExpLib.lua +++ b/ExpLib.lua @@ -139,4 +139,24 @@ function ExpLib.tick_to_display_format(tick) end end +function ExpLib.Gui_tree(root) + local tree = {} + for _,child in pairs(root.children) do + if #child.children > 0 then + if child.name then + tree[child.name] = ExpLib.Gui_tree(child) + else + table.insert(tree,ExpLib.Gui_tree(child)) + end + else + if child.name then + tree[child.name] = child.type + else + table.insert(tree,child.type) + end + end + end + return tree +end + return ExpLib \ No newline at end of file