mirror of
https://github.com/PHIDIAS0303/ExpCluster.git
synced 2025-12-29 12:16:37 +09:00
Use new linter (#294)
* Use new linter * Luacheck and Sumneko Lua fixes * Bump CI action versions * Fix excludes for ldoc
This commit is contained in:
@@ -30,7 +30,7 @@ return {
|
||||
['roundabout'] = {'chat-bot.loops'},
|
||||
['roundabouts'] = {'chat-bot.loops'},
|
||||
['redmew'] = {'info.redmew'},
|
||||
['afk'] = function(player)
|
||||
['afk'] = function(player, _is_command)
|
||||
local max = player
|
||||
for _, next_player in pairs(game.connected_players) do
|
||||
if max.afk_time < next_player.afk_time then
|
||||
@@ -39,13 +39,13 @@ return {
|
||||
end
|
||||
return {'chat-bot.afk', max.name, format_time(max.afk_time, {minutes = true, seconds = true, long = true})}
|
||||
end,
|
||||
['players'] = function()
|
||||
['players'] = function(_player, _is_command)
|
||||
return {'chat-bot.players', #game.players}
|
||||
end,
|
||||
['online'] = function()
|
||||
['online'] = function(_player, _is_command)
|
||||
return {'chat-bot.players-online', #game.connected_players}
|
||||
end,
|
||||
['r!verify'] = function(player)
|
||||
['r!verify'] = function(player, _is_command)
|
||||
return {'chat-bot.verify', player.name}
|
||||
end,
|
||||
},
|
||||
@@ -54,7 +54,7 @@ return {
|
||||
command_prefix = '!', --- @setting command_prefix prefix used for commands below and to print to all players (if enabled above)
|
||||
commands = { --- @setting commands will trigger only when command prefix is given
|
||||
['dev'] = {'chat-bot.not-real-dev'},
|
||||
['blame'] = function(player)
|
||||
['blame'] = function(player, _is_command)
|
||||
local names = {'Cooldude2606', 'arty714', 'badgamernl', 'mark9064', 'aldldl', 'Drahc_pro', player.name}
|
||||
for _, next_player in pairs(game.connected_players) do
|
||||
names[#names + 1] = next_player.name
|
||||
@@ -65,52 +65,52 @@ return {
|
||||
['aids'] = {'chat-bot.aids'},
|
||||
['riot'] = {'chat-bot.riot'},
|
||||
['lenny'] = {'chat-bot.lenny'},
|
||||
['hodor'] = function()
|
||||
['hodor'] = function(_player, _is_command)
|
||||
local options = {'?', '.', '!', '!!!'}
|
||||
return {'chat-bot.hodor', table.get_random_dictionary_entry(options)}
|
||||
end,
|
||||
['evolution'] = function()
|
||||
['evolution'] = function(_player, _is_command)
|
||||
return {'chat-bot.current-evolution', string.format('%.2f', game.forces['enemy'].evolution_factor)}
|
||||
end,
|
||||
['makepopcorn'] = function(player)
|
||||
['makepopcorn'] = function(player, _is_command)
|
||||
local timeout = math.floor(180*(math.random()+0.5))
|
||||
Async(async_message, true, {'chat-bot.reply', {'chat-bot.get-popcorn-1'}})
|
||||
Async.wait(timeout, async_message, true, {'chat-bot.reply', {'chat-bot.get-popcorn-2', player.name}})
|
||||
end,
|
||||
['passsomesnaps'] = function(player)
|
||||
['passsomesnaps'] = function(player, _is_command)
|
||||
local timeout = math.floor(180*(math.random()+0.5))
|
||||
Async(async_message, player, {'chat-bot.reply', {'chat-bot.get-snaps-1'}})
|
||||
Async.wait(timeout, async_message, true, {'chat-bot.reply', {'chat-bot.get-snaps-2', player.name}})
|
||||
Async.wait(timeout*(math.random()+0.5), async_message, true, {'chat-bot.reply', {'chat-bot.get-snaps-3', player.name}})
|
||||
end,
|
||||
['makecocktail'] = function(player)
|
||||
['makecocktail'] = function(player, _is_command)
|
||||
local timeout = math.floor(180*(math.random()+0.5))
|
||||
Async(async_message, true, {'chat-bot.reply', {'chat-bot.get-cocktail-1'}})
|
||||
Async.wait(timeout, async_message, true, {'chat-bot.reply', {'chat-bot.get-cocktail-2', player.name}})
|
||||
Async.wait(timeout*(math.random()+0.5), async_message, true, {'chat-bot.reply', {'chat-bot.get-cocktail-3', player.name}})
|
||||
end,
|
||||
['makecoffee'] = function(player)
|
||||
['makecoffee'] = function(player, _is_command)
|
||||
local timeout = math.floor(180*(math.random()+0.5))
|
||||
Async(async_message, true, {'chat-bot.reply', {'chat-bot.make-coffee-1'}})
|
||||
Async.wait(timeout, async_message, true, {'chat-bot.reply', {'chat-bot.make-coffee-2', player.name}})
|
||||
end,
|
||||
['orderpizza'] = function(player)
|
||||
['orderpizza'] = function(player, _is_command)
|
||||
local timeout = math.floor(180*(math.random()+0.5))
|
||||
Async(async_message, true, {'chat-bot.reply', {'chat-bot.order-pizza-1'}})
|
||||
Async.wait(timeout, async_message, true, {'chat-bot.reply', {'chat-bot.order-pizza-2', player.name}})
|
||||
Async.wait(timeout*(math.random()+0.5), async_message, true, {'chat-bot.reply', {'chat-bot.order-pizza-3', player.name}})
|
||||
end,
|
||||
['maketea'] = function(player)
|
||||
['maketea'] = function(player, _is_command)
|
||||
local timeout = math.floor(180*(math.random()+0.5))
|
||||
Async(async_message, true, {'chat-bot.reply', {'chat-bot.make-tea-1'}})
|
||||
Async.wait(timeout, async_message, true, {'chat-bot.reply', {'chat-bot.make-tea-2', player.name}})
|
||||
end,
|
||||
['meadplease'] = function(player)
|
||||
['meadplease'] = function(player, _is_command)
|
||||
local timeout = math.floor(180*(math.random()+0.5))
|
||||
Async(async_message, true, {'chat-bot.reply', {'chat-bot.get-mead-1'}})
|
||||
Async.wait(timeout, async_message, true, {'chat-bot.reply', {'chat-bot.get-mead-2', player.name}})
|
||||
end,
|
||||
['passabeer'] = function(player)
|
||||
['passabeer'] = function(player, _is_command)
|
||||
local timeout = math.floor(180*(math.random()+0.5))
|
||||
Async(async_message, true, {'chat-bot.reply', {'chat-bot.get-beer-1'}})
|
||||
Async.wait(timeout, async_message, true, {'chat-bot.reply', {'chat-bot.get-beer-2', player.name}})
|
||||
|
||||
Reference in New Issue
Block a user