mirror of
https://github.com/ComfyFactory/ComfyFactorio.git
synced 2025-01-22 03:38:48 +02:00
trust/untrust glitch fix
This commit is contained in:
parent
2e11a3eb44
commit
7d03666879
12
chatbot.lua
12
chatbot.lua
@ -33,8 +33,10 @@ local function process_custom_commands(event)
|
||||
if word == "trust" or word == "regular" then
|
||||
for word in string.gmatch(event.message, "%g+") do
|
||||
if game.players[word] then
|
||||
global.trusted_players[word] = true
|
||||
game.print(word .. " is now a trusted player.", {r=0.22, g=0.99, b=0.99})
|
||||
if game.players[word].name == word then
|
||||
global.trusted_players[word] = true
|
||||
game.print(word .. " is now a trusted player.", {r=0.22, g=0.99, b=0.99})
|
||||
end
|
||||
end
|
||||
end
|
||||
return
|
||||
@ -42,8 +44,10 @@ local function process_custom_commands(event)
|
||||
if word == "untrust" then
|
||||
for word in string.gmatch(event.message, "%g+") do
|
||||
if game.players[word] then
|
||||
global.trusted_players[word] = false
|
||||
game.print(word .. " is no longer a trusted player.", {r=0.22, g=0.99, b=0.99})
|
||||
if game.players[word].name == word then
|
||||
global.trusted_players[word] = false
|
||||
game.print(word .. " is no longer a trusted player.", {r=0.22, g=0.99, b=0.99})
|
||||
end
|
||||
end
|
||||
end
|
||||
return
|
||||
|
Loading…
x
Reference in New Issue
Block a user