--[[
	Init function that creates all the rooms
]]

function RoomManager.init()
	local roomModels = CollectionService:GetTagged(Constants.Tag.Room)

	for _, model in pairs(roomModels) do
		local room = rooms:add(model)

		room.stateChanged:Connect(RoomManager._updateStatusValues)
	end

	RoomManager._flashAlerts()
	RoomManager._updateStatusValues()

	workspace:GetPropertyChangedSignal("Gravity"):Connect(
		function()
			if workspace.Gravity == 0 then
				for _, room in pairs(rooms:getAll()) do
					room:applyMicroVelocityToParts()
				end
			end
		end
	)
end
