Multiple Bug Fixs

This commit is contained in:
Cooldude2606
2018-11-04 17:18:25 +00:00
parent 4311bf765f
commit bbd1a0acd7
7 changed files with 18 additions and 17 deletions

View File

@@ -35,10 +35,6 @@ function Admin.create_reason(reason,name)
return reason
end
function Admin.open(player,pre_select_player,pre_select_action)
if Admin.center then Gui.center.clear(player) Admin.center.open(player,pre_select_player,pre_select_action) end
end
function Admin.allowed(player)
local player = Game.get_player(player)
if Role then

View File

@@ -28,6 +28,11 @@ local AdminGui = {
buttons={}
}
function Admin.open(player,pre_select_player,pre_select_action)
Gui.center.clear(player)
Admin.center.open(player,pre_select_player,pre_select_action)
end
-- Function Define
function AdminGui.add_button(name,caption,tooltip,callback)
AdminGui.buttons[name] = Gui.inputs.add{
@@ -212,5 +217,4 @@ Admin.center = Gui.center{
-- Module Return
-- calling will draw the admin buttons to that frame
Admin.button_flow = AdminGui
return setmetatable(AdminGui,{__call=function(self,...) self.draw(...) end})

View File

@@ -39,7 +39,6 @@ function Admin.jail(player,by_player,reason)
['By:']='<<inline>>'..by_player_name,
['Reason:']=reason
} end
if Admin.move_inventory then Admin.move_inventory(player) end
Role.meta.last_jail = player.name
Server.interface(Role.unassign,true,player,Role.get(player),by_player_name)
Server.interface(Role.assign,true,player,'Jail',by_player_name)

View File

@@ -125,7 +125,7 @@ local confirm_report = Gui.inputs{
type='button',
name='admin-report-confirm',
caption='utility/spawn_flag',
tooltip={'ExpGamingAdmin.name'}
tooltip={'ExpGamingAdmin.report'}
}:on_event('click',function(event)
local parent = event.element.parent
local player = Game.get_player(parent.player.caption)
@@ -138,7 +138,7 @@ Admin.report_btn = Gui.inputs{
type='button',
name='admin-report',
caption='utility/spawn_flag',
tooltip={'ExpGamingAdmin.name'}
tooltip={'ExpGamingAdmin.report'}
}:on_event('click',function(event)
local parent = event.element.parent
local player = Game.get_player(parent.children[1].name)
@@ -150,7 +150,7 @@ Admin.report_btn = Gui.inputs{
name='report-gui'
}
_player.opened=frame
frame.caption={'ExpGamingAdmin.name'}
frame.caption={'ExpGamingAdmin.report'}
frame.add{
type='textfield',
name='reason'