mirror of
https://github.com/PHIDIAS0303/ExpCluster.git
synced 2025-12-30 12:31:41 +09:00
Allowed the chaining of the on_event function
This commit is contained in:
@@ -220,16 +220,15 @@ function Ranking._rank:print(rtn,colour)
|
||||
end
|
||||
else
|
||||
-- using threads to make less lag
|
||||
local thread = Server.new_thread{data={rank=self,rtn=rtn}}
|
||||
thread:on_event('resolve',function(thread)
|
||||
Server.new_thread{
|
||||
data={rank=self,rtn=rtn}
|
||||
}:on_event('resolve',function(thread)
|
||||
return thread.data.rank:get_players(true)
|
||||
end)
|
||||
thread:on_event('success',function(thread,players)
|
||||
end):on_event('success',function(thread,players)
|
||||
for _,player in pairs(players) do
|
||||
player_return(thread.data.rtn,colour,player)
|
||||
end
|
||||
end)
|
||||
thread:queue()
|
||||
end):queue()
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user