экономика
This commit is contained in:
1 parent
0e90e8d28e
commit
8f721a99db
3 files changed
+32
-8
No files matched your search
@@ -83,6 +83,16 @@ pcall(function()
|
||||
store = DataStoreService:GetDataStore("FishingGame_v2")
|
||||
marketStore = DataStoreService:GetDataStore("FishMarket_v1")
|
||||
end)
|
||||
-- неопубликованный плейс / Studio без доступа к API: GetDataStore проходит, но любой запрос падает.
|
||||
-- Тогда сразу играем без сохранения (иначе вход ждал бы повторов загрузки и интерфейс стоял пустым)
|
||||
if store and RunService:IsStudio() then
|
||||
local ok = pcall(function()
|
||||
store:GetAsync("probe")
|
||||
end)
|
||||
if not ok then
|
||||
store, marketStore = nil, nil
|
||||
end
|
||||
end
|
||||
-- замок сессии: профиль открыт только на одном сервере (без этого возможен дюп между серверами и на рынке)
|
||||
local playerStore = store and PlayerStore.new(store, { staleAfter = 600 }) or nil
|
||||
|
||||
|
||||
Reference in new issue
Block a user