From 00210804b6e636eec20e4643e4be152d8a2bc130 Mon Sep 17 00:00:00 2001 From: Cooldude2606 Date: Fri, 8 Feb 2019 18:22:19 +0000 Subject: [PATCH 1/5] Fixed Player list bug --- modules/ExpGamingPlayer/playerList/src/ranking.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/ExpGamingPlayer/playerList/src/ranking.lua b/modules/ExpGamingPlayer/playerList/src/ranking.lua index 66a94eae..7ef48a58 100644 --- a/modules/ExpGamingPlayer/playerList/src/ranking.lua +++ b/modules/ExpGamingPlayer/playerList/src/ranking.lua @@ -6,7 +6,7 @@ return function() local rtn = {} local default = {} for _,role_name in pairs(Role.order) do - local role = Role.get(role_name) + local role = Role.get(role_name,true) if role.is_default then default = {role.colour,role.short_hand,role:get_players(true),role.not_reportable} else table.insert(rtn,{role.colour,role.short_hand,role:get_players(true),role.not_reportable}) end end From c8f60251797b039832ff2acaf69949f1b78f4502 Mon Sep 17 00:00:00 2001 From: Cooldude2606 Date: Sat, 9 Feb 2019 19:28:14 +0000 Subject: [PATCH 2/5] Partner now allows spectator --- modules/ExpGamingCore/Role/config.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/modules/ExpGamingCore/Role/config.lua b/modules/ExpGamingCore/Role/config.lua index 2ffae81a..32e896ea 100644 --- a/modules/ExpGamingCore/Role/config.lua +++ b/modules/ExpGamingCore/Role/config.lua @@ -162,7 +162,8 @@ Role{ tag='[Partner]', group='HiMember', colour={r=140,g=120,b=200}, - allow_afk_kick=true, + allow_afk_kick=false, + is_spectator=true, allow={ ['global-chat']=true, } From 5d6812274288310152d4538649af4e1da8be74f7 Mon Sep 17 00:00:00 2001 From: Cooldude2606 Date: Tue, 12 Feb 2019 20:34:43 +0000 Subject: [PATCH 3/5] Fixed player print --- modules/ExpGamingLib/control.lua | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/modules/ExpGamingLib/control.lua b/modules/ExpGamingLib/control.lua index b68fb4a3..d9a0083f 100644 --- a/modules/ExpGamingLib/control.lua +++ b/modules/ExpGamingLib/control.lua @@ -116,16 +116,16 @@ function ExpLib.player_return(rtn,colour,player) colour = ExpLib.is_type(colour,'table') and colour or defines.textcolor[colour] ~= defines.color.white and defines.textcolor[colour] or defines.color[colour] player = player or game.player local function _return(callback,rtn) - if ExpLib.is_type(rtn,'table') then + if ExpLib.is_type(rtn,'table',use_colour) then -- test for: userdata, locale string, table with __tostring meta method, any other table - if ExpLib.is_type(rtn.__self,'userdata') then callback('Cant Display Userdata',colour) - elseif ExpLib.is_type(rtn[1],'string') and string.find(rtn[1],'.+[.].+') and not string.find(rtn[1],'%s') then callback(rtn,colour) - elseif getmetatable(rtn) ~= nil and not tostring(rtn):find('table: 0x') then callback(tostring(rtn),colour) - else callback(table.tostring(rtn),colour) end + if ExpLib.is_type(rtn.__self,'userdata') then callback('Cant Display Userdata',use_colour) + elseif ExpLib.is_type(rtn[1],'string') and string.find(rtn[1],'.+[.].+') and not string.find(rtn[1],'%s') then callback(rtn,use_colour) + elseif getmetatable(rtn) ~= nil and not tostring(rtn):find('table: 0x') then callback(tostring(rtn),use_colour) + else callback(table.tostring(rtn),use_colour) end -- test for: function - elseif ExpLib.is_type(rtn,'function') then callback('Cant Display Functions',colour) + elseif ExpLib.is_type(rtn,'function') then callback('Cant Display Functions',use_colour) -- else just call tostring - else callback(tostring(rtn),colour) end + else callback(tostring(rtn),use_colour) end end if player then -- allows any valid player identifier to be used @@ -133,7 +133,7 @@ function ExpLib.player_return(rtn,colour,player) if not player then error('Invalid Player given to player_return',2) end -- plays a nice sound that is different to normal message sound player.play_sound{path='utility/scenario_message'} - _return(player.print,rtn) + _return(player.print,rtn,colour) else _return(rcon.print,rtn) end end From b8beb2cf76d0c2e771a44a14fef52d53df6e71a1 Mon Sep 17 00:00:00 2001 From: Cooldude2606 Date: Wed, 13 Feb 2019 19:34:14 +0000 Subject: [PATCH 4/5] Fixed removing players from vechils with jail --- modules/ExpGamingAdmin/Jail/control.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/ExpGamingAdmin/Jail/control.lua b/modules/ExpGamingAdmin/Jail/control.lua index 7720c182..49ed0f56 100644 --- a/modules/ExpGamingAdmin/Jail/control.lua +++ b/modules/ExpGamingAdmin/Jail/control.lua @@ -40,7 +40,7 @@ function Admin.jail(player,by_player,reason) ['Reason:']=reason } end Role.meta.last_jail = player.name - player.vehicle = nil + player.driving = false Server.interface(Role.assign,true,player,'Jail',by_player.name) Server.interface(Role.unassign,true,player,Role.get(player),by_player.name) end From bdd90cf0681eefc95aed1d9a3d9f0cabb3e2e71b Mon Sep 17 00:00:00 2001 From: Cooldude2606 Date: Fri, 15 Feb 2019 15:02:41 +0000 Subject: [PATCH 5/5] Fixed Homes of same name being counted twise --- modules/ExpGamingCommands/home/control.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/ExpGamingCommands/home/control.lua b/modules/ExpGamingCommands/home/control.lua index 53b9481b..5edc3fbb 100644 --- a/modules/ExpGamingCommands/home/control.lua +++ b/modules/ExpGamingCommands/home/control.lua @@ -20,8 +20,8 @@ commands.add_command('home', 'Allows you to set, remove and goto your homes', { if command == 'set' then local pos = {math.floor(player.position.x),math.floor(player.position.y)} if homes._n+1 > homes._m then player_return{'ExpGamingCommands-home.too-many-homes',homes._m} return commands.error end + if not homes[name] then homes._n=homes._n+1 end homes[name] = pos - homes._n=homes._n+1 player_return{'ExpGamingCommands-home.set',name,pos[1],pos[2]} elseif command == 'remove' then if not homes[name] then player_return{'ExpGamingCommands-home.invalid',name} return commands.error end