@quenty/spawning 10.22.0-canary.544.de8fcee.0 → 10.22.1-canary.545.2374fb2.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 CHANGED
@@ -3,7 +3,26 @@
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
- # [10.22.0-canary.544.de8fcee.0](https://github.com/Quenty/NevermoreEngine/compare/@quenty/spawning@10.21.3...@quenty/spawning@10.22.0-canary.544.de8fcee.0) (2025-04-01)
6
+ ## [10.22.1-canary.545.2374fb2.0](https://github.com/Quenty/NevermoreEngine/compare/@quenty/spawning@10.22.0...@quenty/spawning@10.22.1-canary.545.2374fb2.0) (2025-04-05)
7
+
8
+
9
+ ### Bug Fixes
10
+
11
+ * Add types to packages ([2374fb2](https://github.com/Quenty/NevermoreEngine/commit/2374fb2b043cfbe0e9b507b3316eec46a4e353a0))
12
+
13
+
14
+
15
+
16
+
17
+ # [10.22.0](https://github.com/Quenty/NevermoreEngine/compare/@quenty/spawning@10.21.4...@quenty/spawning@10.22.0) (2025-04-02)
18
+
19
+ **Note:** Version bump only for package @quenty/spawning
20
+
21
+
22
+
23
+
24
+
25
+ ## [10.21.4](https://github.com/Quenty/NevermoreEngine/compare/@quenty/spawning@10.21.3...@quenty/spawning@10.21.4) (2025-03-31)
7
26
 
8
27
  **Note:** Version bump only for package @quenty/spawning
9
28
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@quenty/spawning",
3
- "version": "10.22.0-canary.544.de8fcee.0",
3
+ "version": "10.22.1-canary.545.2374fb2.0",
4
4
  "description": "Centralized spawning system",
5
5
  "keywords": [
6
6
  "Roblox",
@@ -24,16 +24,16 @@
24
24
  "Quenty"
25
25
  ],
26
26
  "dependencies": {
27
- "@quenty/binder": "14.19.0-canary.544.de8fcee.0",
28
- "@quenty/cmdrservice": "13.22.0-canary.544.de8fcee.0",
29
- "@quenty/loader": "10.8.0",
30
- "@quenty/maid": "3.4.0",
31
- "@quenty/randomutils": "6.10.0-canary.544.de8fcee.0",
32
- "@quenty/servicebag": "11.11.1",
27
+ "@quenty/binder": "14.19.1-canary.545.2374fb2.0",
28
+ "@quenty/cmdrservice": "13.22.1-canary.545.2374fb2.0",
29
+ "@quenty/loader": "10.8.1-canary.545.2374fb2.0",
30
+ "@quenty/maid": "3.4.1-canary.545.2374fb2.0",
31
+ "@quenty/randomutils": "6.10.1-canary.545.2374fb2.0",
32
+ "@quenty/servicebag": "11.11.2-canary.545.2374fb2.0",
33
33
  "@quentystudios/t": "^3.0.0"
34
34
  },
35
35
  "publishConfig": {
36
36
  "access": "public"
37
37
  },
38
- "gitHead": "de8fcee995fcdae464964357b4c770c03f4c7e03"
38
+ "gitHead": "2374fb2b043cfbe0e9b507b3316eec46a4e353a0"
39
39
  }
@@ -4,10 +4,12 @@
4
4
 
5
5
  local require = require(script.Parent.loader).load(script)
6
6
 
7
+ local _ServiceBag = require("ServiceBag")
8
+
7
9
  local SpawnServiceClient = {}
8
10
  SpawnServiceClient.ServiceName = "SpawnServiceClient"
9
11
 
10
- function SpawnServiceClient:Init(serviceBag)
12
+ function SpawnServiceClient:Init(serviceBag: _ServiceBag.ServiceBag)
11
13
  assert(not self._serviceBag, "Already initialized")
12
14
  self._serviceBag = assert(serviceBag, "No serviceBag")
13
15
 
@@ -4,14 +4,16 @@
4
4
 
5
5
  local require = require(script.Parent.loader).load(script)
6
6
 
7
+ local _ServiceBag = require("ServiceBag")
8
+
7
9
  local SpawnCmdrService = {}
8
10
  SpawnCmdrService.ServiceName = "SpawnCmdrService"
9
11
 
10
- function SpawnCmdrService:Init(serviceBag)
12
+ function SpawnCmdrService:Init(serviceBag: _ServiceBag.ServiceBag)
11
13
  assert(not self._serviceBag, "Already initialized")
12
14
  self._serviceBag = assert(serviceBag, "No serviceBag")
13
15
 
14
- self._spawnService = self._serviceBag:GetService(require("SpawnService"))
16
+ self._spawnService = self._serviceBag:GetService((require :: any)("SpawnService"))
15
17
  self._cmdrService = self._serviceBag:GetService(require("CmdrService"))
16
18
 
17
19
  self._cmdrService:RegisterCommand({
@@ -9,6 +9,7 @@ local RunService = game:GetService("RunService")
9
9
 
10
10
  local RandomUtils = require("RandomUtils")
11
11
  local Maid = require("Maid")
12
+ local _ServiceBag = require("ServiceBag")
12
13
 
13
14
  local UPDATE_PERIOD_SEC = 5
14
15
  local SPAWN_AFTER_GAME_START = 1
@@ -19,7 +20,7 @@ local TOTAL_BUDGET_BEFORE_WARN = 0.1
19
20
  local SpawnService = {}
20
21
  SpawnService.ServiceName = "SpawnService"
21
22
 
22
- function SpawnService:Init(serviceBag)
23
+ function SpawnService:Init(serviceBag: _ServiceBag.ServiceBag)
23
24
  self._serviceBag = assert(serviceBag, "No serviceBag")
24
25
  self._maid = Maid.new()
25
26
 
@@ -50,14 +51,14 @@ end
50
51
  function SpawnService:Regenerate()
51
52
  local startTime = os.clock()
52
53
 
53
- for _, binder in pairs(self._spawnBinderGroupsServer.Spawners:GetBinders()) do
54
- for _, spawner in pairs(binder:GetAll()) do
54
+ for _, binder in self._spawnBinderGroupsServer.Spawners:GetBinders() do
55
+ for _, spawner in binder:GetAll() do
55
56
  spawner:Regenerate()
56
57
  end
57
58
  end
58
59
 
59
60
  if (os.clock() - startTime) >= 0.05 then
60
- warn(string.format("SpawnService regenerate time: %0.4f ms", (os.clock() - startTime)*1000))
61
+ warn(string.format("SpawnService regenerate time: %0.4f ms", (os.clock() - startTime) * 1000))
61
62
  end
62
63
  end
63
64
 
@@ -67,11 +68,11 @@ function SpawnService:Update()
67
68
  local startTime = os.clock()
68
69
  local spawnerCount = 0
69
70
 
70
- for _, binder in pairs(self._spawnBinderGroupsServer.Spawners:GetBinders()) do
71
+ for _, binder in self._spawnBinderGroupsServer.Spawners:GetBinders() do
71
72
  local classStartTime = os.clock()
72
73
  local classes = RandomUtils.shuffledCopy(binder:GetAll())
73
74
 
74
- for _, spawner in pairs(classes) do
75
+ for _, spawner in classes do
75
76
  spawnerCount = spawnerCount + 1
76
77
  spawner:SpawnUpdate(false)
77
78