@quenty/timesyncservice 8.1.0 → 8.1.2-canary.433.80025dc.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +19 -0
- package/package.json +10 -10
- package/src/Shared/TimeSyncService.lua +7 -7
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,25 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## [8.1.2-canary.433.80025dc.0](https://github.com/Quenty/NevermoreEngine/compare/@quenty/timesyncservice@8.1.1...@quenty/timesyncservice@8.1.2-canary.433.80025dc.0) (2023-12-14)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
* Allow TimeSyncService to initialize in test mode ([bb53e48](https://github.com/Quenty/NevermoreEngine/commit/bb53e48443997beac4ff9ef6a193130d8128eb86))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
## [8.1.1](https://github.com/Quenty/NevermoreEngine/compare/@quenty/timesyncservice@8.1.0...@quenty/timesyncservice@8.1.1) (2023-10-28)
|
|
18
|
+
|
|
19
|
+
**Note:** Version bump only for package @quenty/timesyncservice
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
|
|
6
25
|
# [8.1.0](https://github.com/Quenty/NevermoreEngine/compare/@quenty/timesyncservice@8.0.1...@quenty/timesyncservice@8.1.0) (2023-10-18)
|
|
7
26
|
|
|
8
27
|
**Note:** Version bump only for package @quenty/timesyncservice
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@quenty/timesyncservice",
|
|
3
|
-
"version": "8.1.0",
|
|
3
|
+
"version": "8.1.2-canary.433.80025dc.0",
|
|
4
4
|
"description": "Quenty's TimeSyncService keeps time synchronized between all clients and the server",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"Roblox",
|
|
@@ -26,17 +26,17 @@
|
|
|
26
26
|
"Quenty"
|
|
27
27
|
],
|
|
28
28
|
"dependencies": {
|
|
29
|
-
"@quenty/baseobject": "
|
|
30
|
-
"@quenty/loader": "
|
|
31
|
-
"@quenty/maid": "
|
|
32
|
-
"@quenty/promise": "
|
|
33
|
-
"@quenty/remoting": "
|
|
34
|
-
"@quenty/rx": "
|
|
35
|
-
"@quenty/signal": "
|
|
36
|
-
"@quenty/table": "
|
|
29
|
+
"@quenty/baseobject": "7.0.1-canary.433.80025dc.0",
|
|
30
|
+
"@quenty/loader": "7.0.1-canary.433.80025dc.0",
|
|
31
|
+
"@quenty/maid": "2.6.0",
|
|
32
|
+
"@quenty/promise": "7.0.1-canary.433.80025dc.0",
|
|
33
|
+
"@quenty/remoting": "7.1.2-canary.433.80025dc.0",
|
|
34
|
+
"@quenty/rx": "8.1.2-canary.433.80025dc.0",
|
|
35
|
+
"@quenty/signal": "3.0.1-canary.433.80025dc.0",
|
|
36
|
+
"@quenty/table": "3.3.1-canary.433.80025dc.0"
|
|
37
37
|
},
|
|
38
38
|
"publishConfig": {
|
|
39
39
|
"access": "public"
|
|
40
40
|
},
|
|
41
|
-
"gitHead": "
|
|
41
|
+
"gitHead": "80025dcd926765b502d322bb84e013b973409d8c"
|
|
42
42
|
}
|
|
@@ -33,11 +33,12 @@ function TimeSyncService:Init()
|
|
|
33
33
|
|
|
34
34
|
self._maid = Maid.new()
|
|
35
35
|
|
|
36
|
-
self._clockPromise = Promise.new()
|
|
37
|
-
self._maid:GiveTask(self._clockPromise)
|
|
36
|
+
self._clockPromise = self._maid:Add(Promise.new())
|
|
38
37
|
|
|
39
38
|
if not RunService:IsRunning() then
|
|
40
|
-
|
|
39
|
+
-- Assume we're in server mode
|
|
40
|
+
self._clockPromise:Resolve(self:_buildMasterClock())
|
|
41
|
+
-- selene: allow(if_same_then_else)
|
|
41
42
|
elseif RunService:IsServer() then
|
|
42
43
|
self._clockPromise:Resolve(self:_buildMasterClock())
|
|
43
44
|
elseif RunService:IsClient() then
|
|
@@ -136,8 +137,7 @@ function TimeSyncService:_buildMasterClock()
|
|
|
136
137
|
local remoteEvent = GetRemoteEvent(TimeSyncConstants.REMOTE_EVENT_NAME)
|
|
137
138
|
local remoteFunction = GetRemoteFunction(TimeSyncConstants.REMOTE_FUNCTION_NAME)
|
|
138
139
|
|
|
139
|
-
local clock = MasterClock.new(remoteEvent, remoteFunction)
|
|
140
|
-
self._maid:GiveTask(clock)
|
|
140
|
+
local clock = self._maid:Add(MasterClock.new(remoteEvent, remoteFunction))
|
|
141
141
|
|
|
142
142
|
return clock
|
|
143
143
|
end
|
|
@@ -147,8 +147,8 @@ function TimeSyncService:_promiseSlaveClock()
|
|
|
147
147
|
PromiseGetRemoteEvent(TimeSyncConstants.REMOTE_EVENT_NAME);
|
|
148
148
|
PromiseGetRemoteFunction(TimeSyncConstants.REMOTE_FUNCTION_NAME);
|
|
149
149
|
})):Then(function(remoteEvent, remoteFunction)
|
|
150
|
-
local clock = SlaveClock.new(remoteEvent, remoteFunction)
|
|
151
|
-
|
|
150
|
+
local clock = self._maid:Add(SlaveClock.new(remoteEvent, remoteFunction))
|
|
151
|
+
|
|
152
152
|
return TimeSyncUtils.promiseClockSynced(clock)
|
|
153
153
|
end)
|
|
154
154
|
end
|