1
0
mirror of https://github.com/ComfyFactory/ComfyFactorio.git synced 2025-01-24 03:47:58 +02:00

Merge pull request #301 from ComfyFactory/session_handler

Session handler - fix minor issue
This commit is contained in:
Gerkiz 2022-08-18 21:14:24 +02:00 committed by GitHub
commit 99e9734363
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -386,12 +386,12 @@ Server.on_data_set_changed(
function(data)
local player = game.get_player(data.key)
if player and player.valid then
session[data.player_index] = data.value
session[data.key] = data.value
if data.value > settings.trusted_value then
trusted[data.player_index] = true
trusted[data.key] = true
else
if trusted[data.player_index] then
trusted[data.player_index] = false
if trusted[data.key] then
trusted[data.key] = false
end
end
end