@quenty/softshutdown 9.24.0-canary.ae8d76d.0 → 9.24.1-canary.d9ea7a3.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,15 @@
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
- # [9.24.0-canary.ae8d76d.0](https://github.com/Quenty/NevermoreEngine/compare/@quenty/softshutdown@9.23.3...@quenty/softshutdown@9.24.0-canary.ae8d76d.0) (2025-05-10)
6
+ ## [9.24.1-canary.d9ea7a3.0](https://github.com/Quenty/NevermoreEngine/compare/@quenty/softshutdown@9.24.0...@quenty/softshutdown@9.24.1-canary.d9ea7a3.0) (2025-05-12)
7
+
8
+ **Note:** Version bump only for package @quenty/softshutdown
9
+
10
+
11
+
12
+
13
+
14
+ # [9.24.0](https://github.com/Quenty/NevermoreEngine/compare/@quenty/softshutdown@9.23.3...@quenty/softshutdown@9.24.0) (2025-05-10)
7
15
 
8
16
 
9
17
  ### Bug Fixes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@quenty/softshutdown",
3
- "version": "9.24.0-canary.ae8d76d.0",
3
+ "version": "9.24.1-canary.d9ea7a3.0",
4
4
  "description": "This service lets you shut down servers without losing a bunch of players. When game.OnClose is called, the script teleports everyone in the server into a reserved server.",
5
5
  "keywords": [
6
6
  "Roblox",
@@ -29,25 +29,25 @@
29
29
  "access": "public"
30
30
  },
31
31
  "dependencies": {
32
- "@quenty/attributeutils": "14.18.0-canary.ae8d76d.0",
33
- "@quenty/baseobject": "10.8.3",
34
- "@quenty/basicpane": "13.18.0-canary.ae8d76d.0",
35
- "@quenty/bindtocloseservice": "8.18.0-canary.ae8d76d.0",
36
- "@quenty/blend": "12.19.0-canary.ae8d76d.0",
37
- "@quenty/clienttranslator": "14.20.0-canary.ae8d76d.0",
38
- "@quenty/coreguienabler": "12.19.0-canary.ae8d76d.0",
39
- "@quenty/datastore": "13.21.0-canary.ae8d76d.0",
40
- "@quenty/loader": "10.8.3",
41
- "@quenty/maid": "3.4.3",
32
+ "@quenty/attributeutils": "14.18.0",
33
+ "@quenty/baseobject": "10.9.0",
34
+ "@quenty/basicpane": "13.18.0",
35
+ "@quenty/bindtocloseservice": "8.18.0",
36
+ "@quenty/blend": "12.19.0",
37
+ "@quenty/clienttranslator": "14.20.0",
38
+ "@quenty/coreguienabler": "12.19.0",
39
+ "@quenty/datastore": "13.21.1-canary.d9ea7a3.0",
40
+ "@quenty/loader": "10.9.0",
41
+ "@quenty/maid": "3.5.0",
42
42
  "@quenty/math": "2.7.3",
43
- "@quenty/promise": "10.11.0-canary.ae8d76d.0",
44
- "@quenty/rx": "13.18.0-canary.ae8d76d.0",
45
- "@quenty/servicebag": "11.12.0-canary.ae8d76d.0",
46
- "@quenty/table": "3.7.4",
47
- "@quenty/teleportserviceutils": "9.18.0-canary.ae8d76d.0",
48
- "@quenty/uiobjectutils": "6.17.0-canary.ae8d76d.0",
49
- "@quenty/valuebaseutils": "13.18.0-canary.ae8d76d.0",
50
- "@quenty/valueobject": "13.18.0-canary.ae8d76d.0"
43
+ "@quenty/promise": "10.11.0",
44
+ "@quenty/rx": "13.18.0",
45
+ "@quenty/servicebag": "11.12.1-canary.d9ea7a3.0",
46
+ "@quenty/table": "3.8.0",
47
+ "@quenty/teleportserviceutils": "9.18.0",
48
+ "@quenty/uiobjectutils": "6.17.0",
49
+ "@quenty/valuebaseutils": "13.18.0",
50
+ "@quenty/valueobject": "13.18.0"
51
51
  },
52
- "gitHead": "ae8d76d996594e017ac4bfa19f3c064ebe307cd8"
52
+ "gitHead": "d9ea7a314a7d50712e6abac75d29901c1edea556"
53
53
  }
@@ -4,19 +4,19 @@
4
4
 
5
5
  local require = require(script.Parent.loader).load(script)
6
6
 
7
- local Workspace = game:GetService("Workspace")
8
7
  local TeleportService = game:GetService("TeleportService")
8
+ local Workspace = game:GetService("Workspace")
9
9
 
10
10
  local AttributeValue = require("AttributeValue")
11
+ local CoreGuiEnabler = require("CoreGuiEnabler")
11
12
  local Maid = require("Maid")
12
13
  local PlayerGuiUtils = require("PlayerGuiUtils")
13
14
  local Rx = require("Rx")
15
+ local ServiceBag = require("ServiceBag")
14
16
  local SoftShutdownConstants = require("SoftShutdownConstants")
15
17
  local SoftShutdownTranslator = require("SoftShutdownTranslator")
16
18
  local SoftShutdownUI = require("SoftShutdownUI")
17
19
  local ValueObject = require("ValueObject")
18
- local CoreGuiEnabler = require("CoreGuiEnabler")
19
- local ServiceBag = require("ServiceBag")
20
20
 
21
21
  local SoftShutdownServiceClient = {}
22
22
  SoftShutdownServiceClient.ServiceName = "SoftShutdownServiceClient"
@@ -53,22 +53,24 @@ function SoftShutdownServiceClient:Init(serviceBag: ServiceBag.ServiceBag)
53
53
  end)
54
54
 
55
55
  self._maid:GiveTask(Rx.combineLatest({
56
- isLobby = self._isLobby:Observe();
57
- isShuttingDown = self._isUpdating:Observe();
58
- localTeleportDataSaysIsLobby = self._localTeleportDataSaysIsLobby:Observe();
59
- isArrivingAfterShutdown = self._isArrivingAfterShutdown:Observe();
56
+ isLobby = self._isLobby:Observe(),
57
+ isShuttingDown = self._isUpdating:Observe(),
58
+ localTeleportDataSaysIsLobby = self._localTeleportDataSaysIsLobby:Observe(),
59
+ isArrivingAfterShutdown = self._isArrivingAfterShutdown:Observe(),
60
60
  }):Subscribe(function(state)
61
61
  if state.isLobby or state.localTeleportDataSaysIsLobby then
62
62
  self._maid._shutdownUI = nil
63
63
  if not self._maid._lobbyUI then
64
64
  local screenGui
65
- self._maid._lobbyUI, screenGui = self:_showSoftShutdownUI("shutdown.lobby.title", "shutdown.lobby.subtitle", true)
65
+ self._maid._lobbyUI, screenGui =
66
+ self:_showSoftShutdownUI("shutdown.lobby.title", "shutdown.lobby.subtitle", true)
66
67
 
67
68
  TeleportService:SetTeleportGui(screenGui)
68
69
  end
69
70
  elseif state.isShuttingDown then
70
71
  local screenGui
71
- self._maid._shutdownUI, screenGui = self:_showSoftShutdownUI("shutdown.restart.title", "shutdown.restart.subtitle")
72
+ self._maid._shutdownUI, screenGui =
73
+ self:_showSoftShutdownUI("shutdown.restart.title", "shutdown.restart.subtitle")
72
74
 
73
75
  TeleportService:SetTeleportGui(screenGui)
74
76
 
@@ -195,4 +197,4 @@ function SoftShutdownServiceClient:Destroy()
195
197
  self._maid:DoCleaning()
196
198
  end
197
199
 
198
- return SoftShutdownServiceClient
200
+ return SoftShutdownServiceClient
@@ -9,9 +9,9 @@ local Workspace = game:GetService("Workspace")
9
9
 
10
10
  local BasicPane = require("BasicPane")
11
11
  local Blend = require("Blend")
12
- local SpringObject = require("SpringObject")
13
- local Rx = require("Rx")
14
12
  local Math = require("Math")
13
+ local Rx = require("Rx")
14
+ local SpringObject = require("SpringObject")
15
15
 
16
16
  local SoftShutdownUI = setmetatable({}, BasicPane)
17
17
  SoftShutdownUI.ClassName = "SoftShutdownUI"
@@ -69,178 +69,178 @@ function SoftShutdownUI:_render()
69
69
  local foregroundColor = Color3.new(0.9, 0.9, 0.9)
70
70
 
71
71
  self._maid:GiveTask(percentVisible:Subscribe(function(percent)
72
- self._blur.Size = percent*30
72
+ self._blur.Size = percent * 30
73
73
  self._blur.Enabled = percent > 0
74
74
  end))
75
75
 
76
76
  return Blend.New "Frame" {
77
- Name = "SoftShutdownUI";
78
- Size = UDim2.new(1, 0, 1, 0);
79
- AnchorPoint = Vector2.new(0.5, 0.5);
80
- Position = UDim2.fromScale(0.5, 0.5);
77
+ Name = "SoftShutdownUI",
78
+ Size = UDim2.new(1, 0, 1, 0),
79
+ AnchorPoint = Vector2.new(0.5, 0.5),
80
+ Position = UDim2.fromScale(0.5, 0.5),
81
81
  Active = Blend.Computed(percentVisible, function(visible)
82
82
  return visible > 0
83
- end);
83
+ end),
84
84
  Visible = Blend.Computed(percentVisible, function(visible)
85
85
  return visible > 0
86
- end);
87
- BackgroundColor3 = backgroundColor;
86
+ end),
87
+ BackgroundColor3 = backgroundColor,
88
88
  BackgroundTransparency = Blend.Computed(percentVisible, function(visible)
89
89
  return Math.map(visible, 0, 1, 1, 0.4)
90
- end);
90
+ end),
91
91
 
92
92
  [Blend.Children] = {
93
93
  Blend.New "UIPadding" {
94
- PaddingLeft = UDim.new(0, 20);
95
- PaddingRight = UDim.new(0, 20);
96
- PaddingTop = UDim.new(0, 20);
97
- PaddingBottom = UDim.new(0, 20);
98
- };
94
+ PaddingLeft = UDim.new(0, 20),
95
+ PaddingRight = UDim.new(0, 20),
96
+ PaddingTop = UDim.new(0, 20),
97
+ PaddingBottom = UDim.new(0, 20),
98
+ },
99
99
 
100
100
  Blend.New "Frame" {
101
- Name = "ContentContainer";
102
- Size = UDim2.new(1, 0, 1, 0);
103
- AnchorPoint = Vector2.new(0.5, 0.5);
104
- Position = UDim2.fromScale(0.5, 0.5);
105
- BackgroundTransparency = 1;
101
+ Name = "ContentContainer",
102
+ Size = UDim2.new(1, 0, 1, 0),
103
+ AnchorPoint = Vector2.new(0.5, 0.5),
104
+ Position = UDim2.fromScale(0.5, 0.5),
105
+ BackgroundTransparency = 1,
106
106
 
107
107
  [Blend.Children] = {
108
108
  Blend.New "UIScale" {
109
109
  Scale = Blend.Computed(percentVisible, function(visible)
110
- return 0.7 + 0.3*visible
111
- end);
112
- };
110
+ return 0.7 + 0.3 * visible
111
+ end),
112
+ },
113
113
 
114
114
  Blend.New "Frame" {
115
- Name = "ImageLabelContainer";
116
- Size = UDim2.new(0, 80, 0, 80);
117
- BackgroundTransparency = 1;
118
- LayoutOrder = 1;
115
+ Name = "ImageLabelContainer",
116
+ Size = UDim2.new(0, 80, 0, 80),
117
+ BackgroundTransparency = 1,
118
+ LayoutOrder = 1,
119
119
 
120
120
  [Blend.Children] = {
121
121
  Blend.New "ImageLabel" {
122
- Size = UDim2.new(1, 0, 1, 0);
123
- ImageTransparency = transparency;
124
- BackgroundTransparency = 1;
125
- Image = "rbxassetid://6031302916";
126
- };
127
- };
128
- };
122
+ Size = UDim2.new(1, 0, 1, 0),
123
+ ImageTransparency = transparency,
124
+ BackgroundTransparency = 1,
125
+ Image = "rbxassetid://6031302916",
126
+ },
127
+ },
128
+ },
129
129
 
130
130
  Blend.New "Frame" {
131
- Name = "LabelContainer";
132
- Size = UDim2.new(1, 0, 0, 80);
133
- Position = UDim2.new(0.5, 0, 0.5,0);
134
- AnchorPoint = Vector2.new(0.5, 0.5);
135
- BackgroundTransparency = 1;
136
- LayoutOrder = 2;
131
+ Name = "LabelContainer",
132
+ Size = UDim2.new(1, 0, 0, 80),
133
+ Position = UDim2.new(0.5, 0, 0.5, 0),
134
+ AnchorPoint = Vector2.new(0.5, 0.5),
135
+ BackgroundTransparency = 1,
136
+ LayoutOrder = 2,
137
137
 
138
138
  [Blend.Children] = {
139
139
  Blend.New "TextLabel" {
140
- Name = "TitleLabel";
141
- BackgroundTransparency = 1;
142
- Position = UDim2.fromScale(0.5, 0);
143
- Size = UDim2.new(1, 0, 0.6, 0);
144
- AnchorPoint = Vector2.new(0.5, 0);
145
- Text = self._title;
146
- Font = Enum.Font.SourceSansBold;
147
- TextTransparency = transparency;
148
- TextColor3 = foregroundColor;
149
- LayoutOrder = 1;
150
- TextScaled = true;
151
- };
140
+ Name = "TitleLabel",
141
+ BackgroundTransparency = 1,
142
+ Position = UDim2.fromScale(0.5, 0),
143
+ Size = UDim2.new(1, 0, 0.6, 0),
144
+ AnchorPoint = Vector2.new(0.5, 0),
145
+ Text = self._title,
146
+ Font = Enum.Font.SourceSansBold,
147
+ TextTransparency = transparency,
148
+ TextColor3 = foregroundColor,
149
+ LayoutOrder = 1,
150
+ TextScaled = true,
151
+ },
152
152
 
153
153
  Blend.New "TextLabel" {
154
- Name = "SubtitleLabel";
155
- BackgroundTransparency = 1;
156
- Position = UDim2.fromScale(0.5, 1);
157
- Size = UDim2.new(1, 0, 0.3, 0);
158
- AnchorPoint = Vector2.new(0.5, 1);
159
- Text = self._subtitle;
160
- Font = Enum.Font.SourceSansLight;
161
- TextTransparency = transparency;
162
- TextColor3 = foregroundColor;
163
- LayoutOrder = 2;
164
- TextScaled = true;
165
- };
154
+ Name = "SubtitleLabel",
155
+ BackgroundTransparency = 1,
156
+ Position = UDim2.fromScale(0.5, 1),
157
+ Size = UDim2.new(1, 0, 0.3, 0),
158
+ AnchorPoint = Vector2.new(0.5, 1),
159
+ Text = self._subtitle,
160
+ Font = Enum.Font.SourceSansLight,
161
+ TextTransparency = transparency,
162
+ TextColor3 = foregroundColor,
163
+ LayoutOrder = 2,
164
+ TextScaled = true,
165
+ },
166
166
 
167
167
  Blend.New "UIAspectRatioConstraint" {
168
- AspectRatio = 5;
169
- };
170
- };
171
- };
168
+ AspectRatio = 5,
169
+ },
170
+ },
171
+ },
172
172
 
173
173
  Blend.New "Frame" {
174
- Name = "Spacer";
175
- BackgroundTransparency = 1;
176
- Size = UDim2.new(0, 0, 0, 50);
177
- LayoutOrder = 3;
178
- };
174
+ Name = "Spacer",
175
+ BackgroundTransparency = 1,
176
+ Size = UDim2.new(0, 0, 0, 50),
177
+ LayoutOrder = 3,
178
+ },
179
179
 
180
180
  Blend.New "Frame" {
181
- Name = "LoadingLabel";
182
- Position = UDim2.fromScale(0.5, 0.5);
183
- AnchorPoint = Vector2.new(0.5, 0.5);
184
- LayoutOrder = 4;
185
- Size = UDim2.fromScale(0.25, 0.25);
186
- BackgroundTransparency = 1;
181
+ Name = "LoadingLabel",
182
+ Position = UDim2.fromScale(0.5, 0.5),
183
+ AnchorPoint = Vector2.new(0.5, 0.5),
184
+ LayoutOrder = 4,
185
+ Size = UDim2.fromScale(0.25, 0.25),
186
+ BackgroundTransparency = 1,
187
187
 
188
188
  [Blend.Children] = {
189
189
  Blend.New "Frame" {
190
- Name = "RobloxLogo";
191
- Size = UDim2.new(1, 0, 1, 0);
192
- BackgroundColor3 = foregroundColor;
193
- AnchorPoint = Vector2.new(0.5, 0.5);
194
- Position = UDim2.fromScale(0.5, 0.5);
190
+ Name = "RobloxLogo",
191
+ Size = UDim2.new(1, 0, 1, 0),
192
+ BackgroundColor3 = foregroundColor,
193
+ AnchorPoint = Vector2.new(0.5, 0.5),
194
+ Position = UDim2.fromScale(0.5, 0.5),
195
195
 
196
- BackgroundTransparency = transparency;
196
+ BackgroundTransparency = transparency,
197
197
  Rotation = Rx.fromSignal(RunService.RenderStepped):Pipe({
198
198
  Rx.map(function()
199
199
  -- tick persists between sessions
200
- local t = tick()*math.pi*1.5
200
+ local t = tick() * math.pi * 1.5
201
201
  local smallerWave = math.sin(t)
202
- local percent = (math.sin(t - math.pi/2) + 1)/2
202
+ local percent = (math.sin(t - math.pi / 2) + 1) / 2
203
203
 
204
204
  if smallerWave > 0 then
205
- return 15 + percent*360
205
+ return 15 + percent * 360
206
206
  else
207
207
  return 15
208
208
  end
209
- end);
210
- });
209
+ end),
210
+ }),
211
211
 
212
212
  [Blend.Children] = {
213
213
  Blend.New "Frame" {
214
- BackgroundColor3 = backgroundColor;
215
- Size = UDim2.fromScale(4/14, 4/14);
216
- AnchorPoint = Vector2.new(0.5, 0.5);
217
- Position = UDim2.fromScale(0.5, 0.5);
218
- BackgroundTransparency = transparency;
219
- };
220
- }
221
- };
214
+ BackgroundColor3 = backgroundColor,
215
+ Size = UDim2.fromScale(4 / 14, 4 / 14),
216
+ AnchorPoint = Vector2.new(0.5, 0.5),
217
+ Position = UDim2.fromScale(0.5, 0.5),
218
+ BackgroundTransparency = transparency,
219
+ },
220
+ },
221
+ },
222
222
 
223
223
  Blend.New "UIAspectRatioConstraint" {
224
- AspectRatio = 1;
225
- };
224
+ AspectRatio = 1,
225
+ },
226
226
 
227
227
  Blend.New "UISizeConstraint" {
228
- MaxSize = Vector2.new(math.huge, 50);
229
- };
230
- };
231
- };
228
+ MaxSize = Vector2.new(math.huge, 50),
229
+ },
230
+ },
231
+ },
232
232
 
233
233
  Blend.New "UIListLayout" {
234
- FillDirection = Enum.FillDirection.Vertical;
235
- SortOrder = Enum.SortOrder.LayoutOrder;
236
- HorizontalAlignment = Enum.HorizontalAlignment.Center;
237
- VerticalAlignment = Enum.VerticalAlignment.Center;
238
- Padding = UDim.new(0, 10);
239
- };
240
- };
241
- };
242
- };
234
+ FillDirection = Enum.FillDirection.Vertical,
235
+ SortOrder = Enum.SortOrder.LayoutOrder,
236
+ HorizontalAlignment = Enum.HorizontalAlignment.Center,
237
+ VerticalAlignment = Enum.VerticalAlignment.Center,
238
+ Padding = UDim.new(0, 10),
239
+ },
240
+ },
241
+ },
242
+ },
243
243
  }
244
244
  end
245
245
 
246
- return SoftShutdownUI
246
+ return SoftShutdownUI
@@ -2,12 +2,13 @@
2
2
  @class SoftShutdownUI.story
3
3
  ]]
4
4
 
5
- local require = require(game:GetService("ServerScriptService"):FindFirstChild("LoaderUtils", true).Parent).bootstrapStory(script)
5
+ local require =
6
+ require(game:GetService("ServerScriptService"):FindFirstChild("LoaderUtils", true).Parent).bootstrapStory(script)
6
7
 
7
8
  local Maid = require("Maid")
9
+ local ServiceBag = require("ServiceBag")
8
10
  local SoftShutdownTranslator = require("SoftShutdownTranslator")
9
11
  local SoftShutdownUI = require("SoftShutdownUI")
10
- local ServiceBag = require("ServiceBag")
11
12
 
12
13
  return function(target)
13
14
  local maid = Maid.new()
@@ -31,4 +32,4 @@ return function(target)
31
32
  return function()
32
33
  maid:DoCleaning()
33
34
  end
34
- end
35
+ end
@@ -24,9 +24,9 @@ local Workspace = game:GetService("Workspace")
24
24
  local DataStorePromises = require("DataStorePromises")
25
25
  local Maid = require("Maid")
26
26
  local Promise = require("Promise")
27
+ local ServiceBag = require("ServiceBag")
27
28
  local SoftShutdownConstants = require("SoftShutdownConstants")
28
29
  local TeleportServiceUtils = require("TeleportServiceUtils")
29
- local ServiceBag = require("ServiceBag")
30
30
 
31
31
  local SoftShutdownService = {}
32
32
  SoftShutdownService.ServiceName = "SoftShutdownService"
@@ -84,7 +84,7 @@ function SoftShutdownService:_promiseTeleportPlayersToLobby()
84
84
  local initialTeleportOptions = Instance.new("TeleportOptions")
85
85
  initialTeleportOptions.ShouldReserveServer = true
86
86
  initialTeleportOptions:SetTeleportData({
87
- isSoftShutdownReserveServer = true;
87
+ isSoftShutdownReserveServer = true,
88
88
  })
89
89
 
90
90
  -- Collect any players remaining
@@ -96,9 +96,10 @@ function SoftShutdownService:_promiseTeleportPlayersToLobby()
96
96
  return Promise.spawn(function(resolve, _reject)
97
97
  -- Wait to let the teleport GUI be set
98
98
  task.delay(1, resolve)
99
- end):Then(function()
100
- return TeleportServiceUtils.promiseTeleport(game.PlaceId, players, initialTeleportOptions)
101
99
  end)
100
+ :Then(function()
101
+ return TeleportServiceUtils.promiseTeleport(game.PlaceId, players, initialTeleportOptions)
102
+ end)
102
103
  :Then(function(teleportResult)
103
104
  self._maid._playerAddedCollector = nil
104
105
 
@@ -107,18 +108,24 @@ function SoftShutdownService:_promiseTeleportPlayersToLobby()
107
108
  newTeleportOptions.ServerInstanceId = teleportResult.PrivateServerId
108
109
  newTeleportOptions.ReservedServerAccessCode = teleportResult.ReservedServerAccessCode
109
110
  newTeleportOptions:SetTeleportData({
110
- isSoftShutdownReserveServer = true;
111
+ isSoftShutdownReserveServer = true,
111
112
  })
112
113
 
113
114
  -- Teleport any players that joined during initial teleport
114
115
  local promises = {}
115
116
 
116
117
  if #remainingPlayers > 0 then
117
- table.insert(promises, TeleportServiceUtils.promiseTeleport(game.PlaceId, remainingPlayers, newTeleportOptions))
118
+ table.insert(
119
+ promises,
120
+ TeleportServiceUtils.promiseTeleport(game.PlaceId, remainingPlayers, newTeleportOptions)
121
+ )
118
122
  end
119
123
 
120
124
  self._maid:GiveTask(Players.PlayerAdded:Connect(function(player)
121
- table.insert(promises, TeleportServiceUtils.promiseTeleport(game.PlaceId, { player }, newTeleportOptions))
125
+ table.insert(
126
+ promises,
127
+ TeleportServiceUtils.promiseTeleport(game.PlaceId, { player }, newTeleportOptions)
128
+ )
122
129
  end))
123
130
 
124
131
  -- We hope this works!
@@ -159,22 +166,21 @@ function SoftShutdownService:_promiseRedirectAllPlayers()
159
166
  self._maid:GiveTask(reject)
160
167
 
161
168
  resolve(players)
169
+ end):Then(function(players)
170
+ local teleportOptions = Instance.new("TeleportOptions")
171
+ teleportOptions:SetTeleportData({
172
+ isSoftShutdownArrivingIntoUpdatedServer = true,
173
+ })
174
+
175
+ -- Teleport all remaining players
176
+ self._maid:GiveTask(Players.PlayerAdded:Connect(function(player)
177
+ task.wait(1) -- Let the teleport GUI be set
178
+ TeleportServiceUtils.promiseTeleport(game.PlaceId, { player }, teleportOptions)
179
+ end))
180
+
181
+ -- Try to keep players in the same group
182
+ return TeleportServiceUtils.promiseTeleport(game.PlaceId, players, teleportOptions)
162
183
  end)
163
- :Then(function(players)
164
- local teleportOptions = Instance.new("TeleportOptions")
165
- teleportOptions:SetTeleportData({
166
- isSoftShutdownArrivingIntoUpdatedServer = true;
167
- })
168
-
169
- -- Teleport all remaining players
170
- self._maid:GiveTask(Players.PlayerAdded:Connect(function(player)
171
- task.wait(1) -- Let the teleport GUI be set
172
- TeleportServiceUtils.promiseTeleport(game.PlaceId, { player }, teleportOptions)
173
- end))
174
-
175
- -- Try to keep players in the same group
176
- return TeleportServiceUtils.promiseTeleport(game.PlaceId, players, teleportOptions)
177
- end)
178
184
  end
179
185
 
180
186
  function SoftShutdownService:Destroy()
@@ -8,6 +8,6 @@ local require = require(script.Parent.loader).load(script)
8
8
  local Table = require("Table")
9
9
 
10
10
  return Table.readonly({
11
- IS_SOFT_SHUTDOWN_LOBBY_ATTRIBUTE = "IsSoftShutdownLobby";
12
- IS_SOFT_SHUTDOWN_UPDATING_ATTRIBUTE = "IsSoftshutdownRebootingServers";
13
- })
11
+ IS_SOFT_SHUTDOWN_LOBBY_ATTRIBUTE = "IsSoftShutdownLobby",
12
+ IS_SOFT_SHUTDOWN_UPDATING_ATTRIBUTE = "IsSoftshutdownRebootingServers",
13
+ })
@@ -7,16 +7,16 @@ local require = require(script.Parent.loader).load(script)
7
7
  return require("JSONTranslator").new("SoftShutdownTranslator", "en", {
8
8
  shutdown = {
9
9
  lobby = {
10
- title = "Rebooting servers for update.";
11
- subtitle = "Teleporting back in a moment...";
12
- };
10
+ title = "Rebooting servers for update.",
11
+ subtitle = "Teleporting back in a moment...",
12
+ },
13
13
  restart = {
14
- title = "Rebooting servers for update.";
15
- subtitle = "Please wait...";
16
- };
14
+ title = "Rebooting servers for update.",
15
+ subtitle = "Please wait...",
16
+ },
17
17
  complete = {
18
- title = "Rebooting servers for update.";
19
- subtitle = "Update complete...";
20
- };
21
- };
22
- })
18
+ title = "Rebooting servers for update.",
19
+ subtitle = "Update complete...",
20
+ },
21
+ },
22
+ })
@@ -10,4 +10,4 @@ local require = require(loader).bootstrapGame(loader.Parent)
10
10
  local serviceBag = require("ServiceBag").new()
11
11
  serviceBag:GetService(require("SoftShutdownServiceClient"))
12
12
  serviceBag:Init()
13
- serviceBag:Start()
13
+ serviceBag:Start()
@@ -65,4 +65,4 @@ local serviceBag = require(server.ServiceBag).new()
65
65
  serviceBag:GetService(require(server.SoftShutdownService))
66
66
 
67
67
  serviceBag:Init()
68
- serviceBag:Start()
68
+ serviceBag:Start()