@quenty/spawning 10.47.1 → 10.48.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,6 +3,16 @@
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.48.0](https://github.com/Quenty/NevermoreEngine/compare/@quenty/spawning@10.47.2...@quenty/spawning@10.48.0) (2026-07-14)
7
+
8
+ ### Features
9
+
10
+ - **spawning:** convert package to --!strict ([541257b](https://github.com/Quenty/NevermoreEngine/commit/541257b9ce23eacaf298f5b2aad8939ac3ea17ad))
11
+
12
+ ## [10.47.2](https://github.com/Quenty/NevermoreEngine/compare/@quenty/spawning@10.47.1...@quenty/spawning@10.47.2) (2026-06-03)
13
+
14
+ **Note:** Version bump only for package @quenty/spawning
15
+
6
16
  ## [10.47.1](https://github.com/Quenty/NevermoreEngine/compare/@quenty/spawning@10.47.0...@quenty/spawning@10.47.1) (2026-05-30)
7
17
 
8
18
  **Note:** Version bump only for package @quenty/spawning
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@quenty/spawning",
3
- "version": "10.47.1",
3
+ "version": "10.48.0",
4
4
  "description": "Centralized spawning system",
5
5
  "keywords": [
6
6
  "Roblox",
@@ -27,8 +27,8 @@
27
27
  "Quenty"
28
28
  ],
29
29
  "dependencies": {
30
- "@quenty/binder": "14.36.1",
31
- "@quenty/cmdrservice": "13.45.1",
30
+ "@quenty/binder": "14.37.0",
31
+ "@quenty/cmdrservice": "13.46.0",
32
32
  "@quenty/loader": "10.11.0",
33
33
  "@quenty/maid": "3.9.0",
34
34
  "@quenty/randomutils": "6.17.1",
@@ -39,5 +39,5 @@
39
39
  "publishConfig": {
40
40
  "access": "public"
41
41
  },
42
- "gitHead": "598b2b62b36bdcbdbbd56f7db10c399831cc6eba"
42
+ "gitHead": "13f0162f4971a77378e55e9b7236aea94f0dd3a8"
43
43
  }
@@ -1,4 +1,4 @@
1
- --!nonstrict
1
+ --!strict
2
2
  --[=[
3
3
  @class SpawnBinderGroupsServer
4
4
  ]=]
@@ -6,9 +6,9 @@
6
6
  local require = require(script.Parent.loader).load(script)
7
7
 
8
8
  local BinderGroup = require("BinderGroup")
9
- local t = require("t")
9
+ local t: any = require("t")
10
10
 
11
- return require("BinderGroupProvider").new(function(self, _serviceBag)
11
+ return require("BinderGroupProvider").new(function(self: any, _serviceBag: any)
12
12
  -- SpawnProvider
13
13
  -- self:Add("SpawnProviders", BinderGroup.new(
14
14
  -- {
@@ -1,4 +1,4 @@
1
- --!nonstrict
1
+ --!strict
2
2
  --[=[
3
3
  @class SpawnCmdrService
4
4
  ]=]
@@ -10,8 +10,17 @@ local ServiceBag = require("ServiceBag")
10
10
  local SpawnCmdrService = {}
11
11
  SpawnCmdrService.ServiceName = "SpawnCmdrService"
12
12
 
13
- function SpawnCmdrService:Init(serviceBag: ServiceBag.ServiceBag)
14
- assert(not self._serviceBag, "Already initialized")
13
+ export type SpawnCmdrService = typeof(setmetatable(
14
+ {} :: {
15
+ _serviceBag: ServiceBag.ServiceBag,
16
+ _spawnService: any,
17
+ _cmdrService: any,
18
+ },
19
+ {} :: typeof({ __index = SpawnCmdrService })
20
+ ))
21
+
22
+ function SpawnCmdrService.Init(self: SpawnCmdrService, serviceBag: ServiceBag.ServiceBag): ()
23
+ assert(not (self :: any)._serviceBag, "Already initialized")
15
24
  self._serviceBag = assert(serviceBag, "No serviceBag")
16
25
 
17
26
  self._spawnService = self._serviceBag:GetService((require :: any)("SpawnService"))
@@ -1,4 +1,4 @@
1
- --!nonstrict
1
+ --!strict
2
2
  --[=[
3
3
  Handles spawning stuff in the game
4
4
  @class SpawnService
@@ -8,6 +8,7 @@ local require = require(script.Parent.loader).load(script)
8
8
 
9
9
  local RunService = game:GetService("RunService")
10
10
 
11
+ local Binder = require("Binder")
11
12
  local Maid = require("Maid")
12
13
  local RandomUtils = require("RandomUtils")
13
14
  local ServiceBag = require("ServiceBag")
@@ -21,7 +22,16 @@ local TOTAL_BUDGET_BEFORE_WARN = 0.1
21
22
  local SpawnService = {}
22
23
  SpawnService.ServiceName = "SpawnService"
23
24
 
24
- function SpawnService:Init(serviceBag: ServiceBag.ServiceBag)
25
+ export type SpawnService = typeof(setmetatable(
26
+ {} :: {
27
+ _serviceBag: ServiceBag.ServiceBag,
28
+ _maid: Maid.Maid?,
29
+ _spawnBinderGroupsServer: any,
30
+ },
31
+ {} :: typeof({ __index = SpawnService })
32
+ ))
33
+
34
+ function SpawnService.Init(self: SpawnService, serviceBag: ServiceBag.ServiceBag): ()
25
35
  self._serviceBag = assert(serviceBag, "No serviceBag")
26
36
  self._maid = Maid.new()
27
37
 
@@ -33,11 +43,12 @@ function SpawnService:Init(serviceBag: ServiceBag.ServiceBag)
33
43
  self._serviceBag:GetService(require("SpawnCmdrService"))
34
44
  end
35
45
 
36
- function SpawnService:Start()
46
+ function SpawnService.Start(self: SpawnService): ()
37
47
  local lastUpdateTime = (os.clock() - UPDATE_PERIOD_SEC + SPAWN_AFTER_GAME_START)
48
+ local maid = assert(self._maid, "Not initialized")
38
49
 
39
50
  -- TODO: Smear across update pipeline
40
- self._maid:GiveTask(RunService.Stepped:Connect(function()
51
+ maid:GiveTask(RunService.Stepped:Connect(function()
41
52
  if (lastUpdateTime + UPDATE_PERIOD_SEC) <= os.clock() then
42
53
  lastUpdateTime = os.clock()
43
54
  self:Update()
@@ -45,11 +56,11 @@ function SpawnService:Start()
45
56
  end))
46
57
  end
47
58
 
48
- function SpawnService:AddSpawnerBinder(spawnerBinder)
59
+ function SpawnService.AddSpawnerBinder(self: SpawnService, spawnerBinder: Binder.Binder<any>): ()
49
60
  self._spawnBinderGroupsServer.Spawners:Add(spawnerBinder)
50
61
  end
51
62
 
52
- function SpawnService:Regenerate()
63
+ function SpawnService.Regenerate(self: SpawnService): ()
53
64
  local startTime = os.clock()
54
65
 
55
66
  for _, binder in self._spawnBinderGroupsServer.Spawners:GetBinders() do
@@ -63,7 +74,7 @@ function SpawnService:Regenerate()
63
74
  end
64
75
  end
65
76
 
66
- function SpawnService:Update()
77
+ function SpawnService.Update(self: SpawnService): ()
67
78
  debug.profilebegin("spawnService")
68
79
 
69
80
  local startTime = os.clock()
@@ -106,8 +117,10 @@ function SpawnService:Update()
106
117
  debug.profileend()
107
118
  end
108
119
 
109
- function SpawnService:Destroy()
110
- self._maid:DoCleaning()
120
+ function SpawnService.Destroy(self: SpawnService): ()
121
+ if self._maid then
122
+ self._maid:DoCleaning()
123
+ end
111
124
  self._maid = nil
112
125
  end
113
126