@rbxts/covenant 3.3.0 → 3.3.1
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/package.json +1 -1
- package/src/covenant.luau +18 -15
package/package.json
CHANGED
package/src/covenant.luau
CHANGED
|
@@ -247,6 +247,18 @@ do
|
|
|
247
247
|
local _serverToClientEntityMap = self.serverToClientEntityMap
|
|
248
248
|
local _stringifiedServerEntity = stringifiedServerEntity
|
|
249
249
|
local entity = _serverToClientEntityMap[_stringifiedServerEntity]
|
|
250
|
+
if entityData == Delete then
|
|
251
|
+
if entity ~= nil then
|
|
252
|
+
self:worldDelete(entity)
|
|
253
|
+
end
|
|
254
|
+
local _serverToClientEntityMap_1 = self.serverToClientEntityMap
|
|
255
|
+
local _stringifiedServerEntity_1 = stringifiedServerEntity
|
|
256
|
+
_serverToClientEntityMap_1[_stringifiedServerEntity_1] = nil
|
|
257
|
+
local _clientToServerEntityMap = self.clientToServerEntityMap
|
|
258
|
+
local _arg0 = tostring(entity)
|
|
259
|
+
_clientToServerEntityMap[_arg0] = nil
|
|
260
|
+
return nil
|
|
261
|
+
end
|
|
250
262
|
if entity == nil then
|
|
251
263
|
entity = self._world:entity()
|
|
252
264
|
local _serverToClientEntityMap_1 = self.serverToClientEntityMap
|
|
@@ -258,16 +270,6 @@ do
|
|
|
258
270
|
local _arg1 = tonumber(stringifiedServerEntity)
|
|
259
271
|
_clientToServerEntityMap[_arg0] = _arg1
|
|
260
272
|
end
|
|
261
|
-
if entityData == Delete then
|
|
262
|
-
self:worldDelete(entity)
|
|
263
|
-
local _serverToClientEntityMap_1 = self.serverToClientEntityMap
|
|
264
|
-
local _stringifiedServerEntity_1 = stringifiedServerEntity
|
|
265
|
-
_serverToClientEntityMap_1[_stringifiedServerEntity_1] = nil
|
|
266
|
-
local _clientToServerEntityMap = self.clientToServerEntityMap
|
|
267
|
-
local _arg0 = tostring(entity)
|
|
268
|
-
_clientToServerEntityMap[_arg0] = nil
|
|
269
|
-
return nil
|
|
270
|
-
end
|
|
271
273
|
-- ▼ ReadonlyMap.forEach ▼
|
|
272
274
|
local _callback_2 = function(state, stringifiedComponent)
|
|
273
275
|
local component = tonumber(stringifiedComponent)
|
|
@@ -438,11 +440,12 @@ do
|
|
|
438
440
|
local _clientToServerEntityMap = self.clientToServerEntityMap
|
|
439
441
|
local _arg0_2 = tostring(entity)
|
|
440
442
|
local serverEntity = _clientToServerEntityMap[_arg0_2]
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
443
|
+
if serverEntity ~= nil then
|
|
444
|
+
local _componentChanges = componentChanges
|
|
445
|
+
local _arg0_3 = tostring(serverEntity)
|
|
446
|
+
local _arg1 = if newState ~= nil then newState else Remove
|
|
447
|
+
_componentChanges[_arg0_3] = _arg1
|
|
448
|
+
end
|
|
446
449
|
end
|
|
447
450
|
end
|
|
448
451
|
function Covenant:subscribeComponent(component, subscriber)
|