Skip to content

Commit 2861e8a

Browse files
committed
Removal of deprecated methods
1 parent 1faffc6 commit 2861e8a

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

src/init.lua

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ local CloudTypes : {GroupCloudDescription} = {
7979

8080

8181
local CloudDescription = {
82-
["NormalCloud"] = function(cloud)
82+
["NormalCloud"] = function()
8383

8484
end,
8585
["RainCloud"] = function(cloud)
@@ -94,7 +94,7 @@ local CloudDescription = {
9494

9595
function checkIfPartInBounds(part)
9696
local parts = workspace:GetPartBoundsInBox(CFrame.new(0,0,0), Vector3.new(7000, 5000, 7000))
97-
for i,v in pairs(parts) do
97+
for _,v in pairs(parts) do
9898
if v == part then
9999
return true
100100
end
@@ -104,7 +104,8 @@ end
104104

105105
function Weather.new()
106106
local self = setmetatable({}, Weather)
107-
self.CloudsFolder = Instance.new('Folder', workspace)
107+
self.CloudsFolder = Instance.new('Folder')
108+
self.CloudsFolder.Parent = workspace
108109
self.CloudsFolder.Name = "Clouds"
109110
Tween = TweenInfo.new(30/Weather.timeScaleDivisor, Enum.EasingStyle.Sine, Enum.EasingDirection.InOut)
110111
for i,v in pairs(CloudDescription) do
@@ -113,7 +114,7 @@ function Weather.new()
113114
end)
114115
end
115116
game["Run Service"].Heartbeat:Connect(function()
116-
for i,v in pairs(CollectionService:GetTagged("FloatingObject")) do
117+
for _,v in pairs(CollectionService:GetTagged("FloatingObject")) do
117118
v:PivotTo(CFrame.new(v.WorldPivot.Position + workspace.GlobalWind * Weather.timeScaleDivisor))
118119
if Configuration.Debug.destroyItemsOutsideBounds then
119120
if not checkIfPartInBounds(v) then
@@ -250,14 +251,15 @@ function Weather:Cloud(CloudTypeName, v2p)
250251
local CloudType = CloudTypes[CloudTypeName]
251252
if not CloudType then return end
252253
local cloudDuration = CloudType.Duration
253-
local model = Instance.new("Model", self.CloudsFolder)
254+
local model = Instance.new("Model")
255+
model.Parent = self.CloudsFolder
254256
model.ChildRemoved:Connect(function()
255257
if #model:GetChildren() == 0 then
256258
model:Destroy()
257259
end
258260
end)
259261
model.WorldPivot = CFrame.new(Vector3.new(v2p.x, 100, v2p.y))
260-
for i,cldsDesc in pairs(CloudType.Clouds) do
262+
for _,cldsDesc in pairs(CloudType.Clouds) do
261263

262264
local offset = cldsDesc[1]
263265
local heightoffset = cldsDesc[2]

0 commit comments

Comments
 (0)