1
0
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:
MewMew 2019-04-02 13:59:29 +02:00
parent 2e11a3eb44
commit 7d03666879

View File

@ -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