Skip to content

Commit

Permalink
Merge branch 'develop' into expanse_update
Browse files Browse the repository at this point in the history
  • Loading branch information
Gerkiz authored Aug 18, 2022
2 parents c5018a5 + 1aa4329 commit 412fb76
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions utils/datastore/session_data.lua
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ local Public = {
local try_download_data_token =
Token.register(
function(data)
local player_index = data.player_index
local player_index = data.key
local value = data.value
if value then
session[player_index] = value
Expand All @@ -70,7 +70,10 @@ local try_download_data_token =
local try_upload_data_token =
Token.register(
function(data)
local player_index = data.player_index
local player_index = data.key
if not player_index then
return
end
local value = data.value
local player = game.get_player(player_index)
if value then
Expand Down Expand Up @@ -381,7 +384,7 @@ Event.on_nth_tick(settings.nth_tick, upload_data)
Server.on_data_set_changed(
session_data_set,
function(data)
local player = game.get_player(data.player_index)
local player = game.get_player(data.key)
if player and player.valid then
session[data.player_index] = data.value
if data.value > settings.trusted_value then
Expand Down

0 comments on commit 412fb76

Please sign in to comment.